Created
July 13, 2020 17:36
-
-
Save lizrice/c49130102fec9f9c7ad39e04cbedff9b to your computer and use it in GitHub Desktop.
Role & RoleBinding as an example for who-can
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
namespace: default | |
name: pod-runner | |
rules: | |
- apiGroups: [""] # "" indicates the core API group | |
resources: ["pods"] | |
verbs: ["create", "delete", "get", "watch", "list"] | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: read-pods | |
namespace: default | |
subjects: | |
- kind: User | |
name: Jennifer | |
apiGroup: rbac.authorization.k8s.io | |
roleRef: | |
kind: Role | |
name: pod-runner | |
apiGroup: rbac.authorization.k8s.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment