Skip to content

Instantly share code, notes, and snippets.

@grampelberg
Created January 9, 2018 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save grampelberg/c3d2e960f60936a5db2713a746d9b089 to your computer and use it in GitHub Desktop.
Save grampelberg/c3d2e960f60936a5db2713a746d9b089 to your computer and use it in GitHub Desktop.
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: default-view
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: default
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kube-system
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: ClusterRole
name: view
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: view-other-resources
rules:
- apiGroups: [""]
resources:
- nodes
- secrets
verbs: ["get", "watch", "list"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: view-other-resources
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: default
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kube-system
roleRef:
kind: ClusterRole
name: view-other-resources
apiGroup: rbac.authorization.k8s.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment