Created
January 16, 2022 01:22
-
-
Save neilkuan/1eb96e0f2e8c64ea12cb75dba57649ab to your computer and use it in GitHub Desktop.
sample-rbac-mapping
This file contains hidden or 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: v1 | |
kind: ServiceAccount | |
metadata: | |
name: sample-rbac-mapping | |
namespace: default | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRole | |
metadata: | |
name: sample-rbac-mapping | |
namespace: default | |
rules: | |
- apiGroups: [""] | |
resources: | |
- namespaces | |
- pods | |
verbs: ["get", "list", "watch"] | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: sample-rbac-mapping | |
namespace: defualt | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: sample-rbac-mapping | |
subjects: | |
- kind: ServiceAccount | |
name: sample-rbac-mapping | |
namespace: default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment