In Kubernetes RBAC, cluster-wide permissions are defined withClusterRoleand granted to a user, group, or service account by creating aClusterRoleBinding. The VCF 9.0 documentation for VKS cluster access describes the RBAC workflow used to grant access: first you “define a Role or ClusterRolefor the user or group,” and then you “create a RoleBinding or ClusterRoleBindingfor the user or group and apply it to the cluster.” This wording reflects the RBAC distinction:RoleBindingis scoped to a namespace, whereasClusterRoleBindingis used when the permissions must apply at thecluster scope(cluster-wide resources and/or across namespaces).
VCF 9.0 further illustrates the purpose of ClusterRoleBinding in a token-auth example: it lists the required objects, including “ClusterRole: This defines the access to the Kubernetes cluster” and “ClusterRoleBinding: This binds the created Service Account with the defined ClusterRole.” That binding step is what grants the subject the cluster-level privileges defined in the ClusterRole, makingClusterRoleBindingthe correct object for permissions to cluster-wide resources.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit