Key Concepts
ClusterRoleBinding
Role Reference
Subjects
System Binding
system:, cluster-admin, kubeadm:).Required Permissions
Binding Types
Subject Types
How to View ClusterRoleBindings
Select Cluster
View List
Filter and Search
How to View ClusterRoleBinding Details
Find the ClusterRoleBinding
Click Binding Name
Review Details
- Overview: Name, type (system/custom), age
- Role Reference: The ClusterRole being bound
- Subjects: List of users, groups, and service accounts
- Labels & Annotations: Metadata attached to the binding
How to Create a ClusterRoleBinding
Click Create Binding
Write YAML
roleRef- Reference to the ClusterRole to bindsubjects- List of users, groups, or service accounts
Create
How to Edit a ClusterRoleBinding
Open Actions Menu
Click Edit YAML
Modify Subjects
Save
How to Delete a ClusterRoleBinding
Open Actions Menu
Click Delete
Confirm
Example ClusterRoleBindings
Grant Cluster Admin to User
Grant Read Access to Group
Grant Permissions to ServiceAccount
Multiple Subjects
Subject Reference Format
Common System Bindings
Troubleshooting
User cannot access resources
User cannot access resources
- Verify a ClusterRoleBinding exists for the user
- Check the subject name matches exactly (case-sensitive)
- Verify the ClusterRole has the needed permissions
- Use
kubectl auth can-i --as=<user>to test permissions - Check for typos in user/group names
ServiceAccount permissions not working
ServiceAccount permissions not working
- Verify the namespace is specified in the subject
- Check the ServiceAccount exists in that namespace
- Ensure pods are using the correct ServiceAccount
- Verify the ClusterRoleBinding is cluster-scoped (not RoleBinding)
Cannot delete ClusterRoleBinding
Cannot delete ClusterRoleBinding
- System bindings cannot be deleted
- Verify you have delete permission
- Check for finalizers blocking deletion
Changes not taking effect
Changes not taking effect
- RBAC changes are immediate
- Clear any client-side caching
- Verify the binding was actually updated
- Check if there are conflicting bindings
Cannot change roleRef
Cannot change roleRef
- roleRef is immutable after creation
- Delete the binding and create a new one
- This is by design to prevent privilege escalation
FAQ
What is the difference between ClusterRoleBinding and RoleBinding?
What is the difference between ClusterRoleBinding and RoleBinding?
Can I bind a ClusterRole with a RoleBinding?
Can I bind a ClusterRole with a RoleBinding?
Why can't I change the roleRef?
Why can't I change the roleRef?
roleRef is immutable to prevent privilege escalation. If you could change it, you could escalate permissions without delete access. To change the role, delete and recreate the binding.How do I grant admin access to a user?
How do I grant admin access to a user?
cluster-admin ClusterRole. Be cautious - this grants full access to everything in the cluster.Can multiple bindings reference the same role?
Can multiple bindings reference the same role?
How do groups work in Kubernetes RBAC?
How do groups work in Kubernetes RBAC?
system:masters (cluster-admin) and system:authenticated (all authenticated users).What happens when I delete a user's binding?
What happens when I delete a user's binding?
Can a ServiceAccount be in a ClusterRoleBinding?
Can a ServiceAccount be in a ClusterRoleBinding?