Skip to content

Instantly share code, notes, and snippets.

@mikedanese
Last active March 3, 2017 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikedanese/3727cf38834b6d96bc15ca23d8940a02 to your computer and use it in GitHub Desktop.
Save mikedanese/3727cf38834b6d96bc15ca23d8940a02 to your computer and use it in GitHub Desktop.
kind: Role
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
namespace: default
name: pod-reader
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: read-pods
namespace: default
subjects:
- kind: User
name: mike@example.com
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment