Skip to content

Instantly share code, notes, and snippets.

@jer
Created September 2, 2016 21:52
Show Gist options
  • Save jer/16d2f6397022554bc52aa8a51dc76e39 to your computer and use it in GitHub Desktop.
Save jer/16d2f6397022554bc52aa8a51dc76e39 to your computer and use it in GitHub Desktop.
k8s RBAC role for kubelet
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: kubelet-role
rules:
- apiGroups: ["*"]
resources: ["pods", "nodes"]
verbs: ["*"]
nonResourceURLs: ["*"]
- apiGroups: ["*"]
resources:
- services
- persistentvolumes
- persistentvolumeclaims
- replicationcontrollers
- replicasets
- jobs
- daemonsets
- deployments
- ingress
- horizontalpodautoscalers
- configmaps
verbs: ["get", "list", "watch"]
nonResourceURLs: ["*"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: kubelet
subjects:
- kind: User
name: kubelet
roleRef:
kind: ClusterRole
name: kubelet-role
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment