Key Concepts
Role
Rules
Namespace
System Role
system: or containing kubernetes.io).Required Permissions
Role Types
How to View Roles
Select Cluster
Select Namespace
Filter and Search
How to View Role Details
Find the Role
Click Role Name
Review Details
- Overview: Name, namespace, type (system/custom), rules count, age
- Rules: Detailed list of permissions (verbs, resources, API groups)
- Labels & Annotations: Metadata attached to the Role
How to Create a Role
Click Create Role
Write YAML
metadata.namespace- Target namespacerules- Array of permission rules
Create
How to Edit a Role
Open Actions Menu
Click Edit YAML
Modify Rules
Save
How to Delete a Role
Open Actions Menu
Click Delete
Confirm
Rule Structure
Each rule in a Role specifies:Common Verbs
Example Roles
Pod Reader
Deployment Manager
ConfigMap and Secret Manager
Specific Resource Access
Full Namespace Admin
Role vs ClusterRole
Troubleshooting
User cannot access namespace resources
User cannot access namespace resources
- Verify a RoleBinding exists binding the user to a Role
- Check the Role has the necessary rules
- Verify the Role and RoleBinding are in the same namespace
- Use
kubectl auth can-i --as=<user> -n <namespace>to test permissions
Cannot delete Role
Cannot delete Role
- System roles cannot be deleted
- Verify you have delete permission
- Check for finalizers blocking deletion
Permission changes not taking effect
Permission changes not taking effect
- RBAC changes are immediate, no restart needed
- Verify the RoleBinding references the correct Role
- Check if there are multiple Roles/bindings affecting the user
- Clear any client-side caching
Role in wrong namespace
Role in wrong namespace
- Roles only grant permissions in their namespace
- Delete and recreate the Role in the correct namespace
- Or use a ClusterRole with RoleBinding for reusability
Cannot access resources in other namespaces
Cannot access resources in other namespaces
- Roles are namespace-scoped
- Create separate Roles in each namespace, or
- Use ClusterRole with RoleBinding per namespace, or
- Use ClusterRole with ClusterRoleBinding for all namespaces
FAQ
What is the difference between Role and ClusterRole?
What is the difference between Role and ClusterRole?
Can a Role grant access to cluster-scoped resources?
Can a Role grant access to cluster-scoped resources?
How do I reuse a Role across namespaces?
How do I reuse a Role across namespaces?
- Create identical Roles in each namespace
- Use a ClusterRole and bind it with RoleBindings in each namespace (recommended)
Can I bind a ClusterRole with a RoleBinding?
Can I bind a ClusterRole with a RoleBinding?
What happens if I delete a namespace with Roles?
What happens if I delete a namespace with Roles?
How do I check what permissions a Role grants?
How do I check what permissions a Role grants?
kubectl describe role <name> -n <namespace> or click on the Role in the UI to see the complete rule list.Can a Role grant permissions to resources it doesn't have?
Can a Role grant permissions to resources it doesn't have?
Should I create Roles or use built-in ClusterRoles?
Should I create Roles or use built-in ClusterRoles?
admin, edit, view) with RoleBindings for common scenarios. Create custom Roles when you need fine-grained, namespace-specific permissions that don’t match built-in roles.