Skip to content

Instantly share code, notes, and snippets.

@dcberg
Last active September 27, 2018 08:15
Show Gist options
  • Save dcberg/473736105fc4075e49a3b7abbbf379aa to your computer and use it in GitHub Desktop.
Save dcberg/473736105fc4075e49a3b7abbbf379aa to your computer and use it in GitHub Desktop.
Kubernetes rbac file providing read-only access for weave-works scope using the v1alpha1 format for rbac.
# Read-only permissions and roles for weave-scope
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: weave-scope-mgr
rules:
- apiGroups: ["*"]
resources: ["services", "deployments", "replicasets", "pods", "replicationcontrollers", "namesapces", "nodes", "daemonsets"]
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["*"]
verbs: ["*"]
---
# Grant permissions to weave-scope in the kube-system namespace.
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: weave-scope-mgr-role-binding
subjects:
- kind: ServiceAccount
name: weave-scope
namespace: kube-system
roleRef:
kind: ClusterRole
name: weave-scope-mgr
apiGroup: rbac.authorization.k8s.io
@nerdinand
Copy link

Typo on line 8: namesapces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment