Key Concepts
ClusterRole
Rules
System Role
system:, admin, edit, view).Aggregation
Required Permissions
Role Types
How to View ClusterRoles
Select Cluster
View List
Filter and Search
How to View ClusterRole Details
Find the ClusterRole
Click ClusterRole Name
Review Details
- Overview: Name, type (system/custom), rules count, age
- Rules: Detailed list of permissions (verbs, resources, API groups)
- Aggregation Rule: Label selectors for aggregated roles
- Labels & Annotations: Metadata attached to the ClusterRole
How to Create a ClusterRole
Click Create ClusterRole
Write YAML
rules- Array of permission rulesaggregationRule- Optional, for aggregated roles
Create
How to Edit a ClusterRole
Open Actions Menu
Click Edit YAML
Modify Rules
Save
How to Delete a ClusterRole
Open Actions Menu
Click Delete
Confirm
Rule Structure
Each rule in a ClusterRole specifies:Common Verbs
Example ClusterRoles
Read-Only Cluster Access
Node Administrator
PV Manager
Aggregated ClusterRole
Built-in ClusterRoles
Troubleshooting
User cannot access cluster resources
User cannot access cluster resources
- Verify a ClusterRoleBinding exists binding the user to a ClusterRole
- Check the ClusterRole has the necessary rules
- Use
kubectl auth can-ito test permissions - Verify the subject (user/group/serviceaccount) is correct
Cannot delete ClusterRole
Cannot delete ClusterRole
- System roles cannot be deleted (names starting with
system:,admin,edit,view) - Verify you have delete permission
- Check for finalizers blocking deletion
Aggregated ClusterRole not updating
Aggregated ClusterRole not updating
- Verify source ClusterRoles have matching labels
- Check aggregationRule selector syntax
- Label changes may take a moment to propagate
- Verify source ClusterRoles exist
Permission changes not taking effect
Permission changes not taking effect
- RBAC changes are immediate, no restart needed
- Clear any client-side caching (kubectl, dashboard)
- Verify the binding is correct (ClusterRoleBinding vs RoleBinding)
- Check for conflicting roles that might override permissions
Wildcard permissions not working as expected
Wildcard permissions not working as expected
*in verbs grants all verbs*in resources grants access to all resources in specified apiGroups- Empty apiGroups
[""]means core API only - Use
["*"]for all API groups
FAQ
What is the difference between ClusterRole and Role?
What is the difference between ClusterRole and Role?
- Grant access to cluster-scoped resources (nodes, PVs, namespaces)
- Grant access across all namespaces
- Grant access to non-resource endpoints
How do I grant cluster-admin access?
How do I grant cluster-admin access?
cluster-admin ClusterRole. Be very careful - this grants full access to everything.What are aggregated ClusterRoles?
What are aggregated ClusterRoles?
admin, edit, and view roles use aggregation.Can I use ClusterRoles with RoleBindings?
Can I use ClusterRoles with RoleBindings?
How do I check what permissions a ClusterRole grants?
How do I check what permissions a ClusterRole grants?
kubectl describe clusterrole <name> or click on the ClusterRole in the UI to see the complete rule list.What is the principle of least privilege?
What is the principle of least privilege?
cluster-admin, create custom ClusterRoles with specific verbs and resources. Use get, list, watch for read-only access instead of *.How do non-resource URLs work?
How do non-resource URLs work?
/healthz, /api, /metrics are accessed via nonResourceURLs in rules instead of resources. They require explicit rules since they’re not Kubernetes resources.Can I restrict a ClusterRole to specific namespaces?
Can I restrict a ClusterRole to specific namespaces?