Created
January 22, 2021 16:52
-
-
Save minherz/b7ab978f9e6c50cc8d2a247a42b5a5fe to your computer and use it in GitHub Desktop.
example of rbac setting
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: v1 | |
kind: ServiceAccount | |
metadata: | |
name: node-labeling-robot | |
namespace: default | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: node-info-reader | |
rules: | |
- apiGroups: [""] | |
resources: ["nodes"] | |
verbs: ["get", "list", "watch"] | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: node-labeling-robot-read-nodes | |
subjects: | |
- kind: ServiceAccount | |
name: node-labeling-robot | |
namespace: default | |
apiGroup: "" | |
roleRef: | |
kind: ClusterRole | |
name: node-info-reader | |
apiGroup: rbac.authorization.k8s.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment