Created
January 16, 2022 01:22
-
-
Save neilkuan/1eb96e0f2e8c64ea12cb75dba57649ab to your computer and use it in GitHub Desktop.
Revisions
-
neilkuan created this gist
Jan 16, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ 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