Difference between revisions of "Kind: ClusterRoleBinding"

From wikieduonline
Jump to navigation Jump to search
Line 26: Line 26:
 
* [[K8s Cluster roles]]
 
* [[K8s Cluster roles]]
 
* [[cluster-read-only-role]]
 
* [[cluster-read-only-role]]
 +
* [[kubectl describe clusterrolebindings]]
  
 
== See also ==
 
== See also ==

Revision as of 12:47, 31 October 2023

apiVersion: rbac.authorization.k8s.io/v1
# This cluster role binding allows anyone in the "manager" group to read secrets in any namespace.
kind: ClusterRoleBinding
metadata:
  name: read-secrets-global
subjects:
- kind: Group
  name: manager # Name is case sensitive
  apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: ClusterRole
  name: secret-reader
  apiGroup: rbac.authorization.k8s.io
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#clusterrolebinding-example


 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: cluster-read-only-role-binding
subjects:
 - kind: User
   name: discovery-read-only-user
   apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: ClusterRole
  name: cluster-read-only-role 
  apiGroup: rbac.authorization.k8s.io


roleRef
RoleBinding

Related

See also

Advertising: