Manage Kubernetes RoleBindings to grant namespace-scoped permissions to users, groups, and service accounts
RoleBindings grant the permissions defined in a Role or ClusterRole to subjects (users, groups, or service accounts) within a specific namespace. They connect Roles to identities that need those permissions.
A namespace-scoped binding that grants Role or ClusterRole permissions to subjects within a namespace.
Role Reference
The Role or ClusterRole whose permissions are being granted by this binding.
Subjects
The users, groups, or service accounts receiving the permissions.
System Binding
Built-in bindings managed by Kubernetes (prefixed with system: or kubeadm:).
RoleBindings are namespace-scoped resources. They can reference either a Role (same namespace) or a ClusterRole, but permissions are always limited to the RoleBinding’s namespace.
Select Delete from the menu (disabled for system bindings).
3
Confirm
Confirm the deletion. Subjects will immediately lose the permissions granted by this binding within the namespace.
Deleting a RoleBinding immediately revokes permissions from all subjects within that namespace. They will lose access to resources granted by the bound Role or ClusterRole.
Use RoleBindings with ClusterRoles to reuse permission sets across namespaces without granting cluster-wide access. The permissions are limited to the RoleBinding’s namespace.
What is the difference between RoleBinding and ClusterRoleBinding?
RoleBinding grants permissions only within a single namespace. It can reference either a Role or ClusterRole.ClusterRoleBinding grants permissions cluster-wide across all namespaces and can only reference ClusterRoles.
Can a RoleBinding reference a ClusterRole?
Yes. A RoleBinding can reference a ClusterRole, but permissions are limited to the RoleBinding’s namespace. This is useful for reusing common roles across namespaces without granting cluster-wide access.
Why can't I change the roleRef?
The 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 the same permissions in multiple namespaces?
You have two options:
Create separate RoleBindings in each namespace referencing the same Role (requires Role in each namespace)
Create a ClusterRole and bind it with RoleBindings in each namespace (recommended)
The second approach is easier to maintain since you only update the ClusterRole.
Can multiple bindings reference the same role?
Yes. You can have multiple RoleBindings referencing the same Role or ClusterRole, each with different subjects. Permissions are additive.
What happens when I delete a user's binding?
The user immediately loses the permissions granted by that binding in that namespace. If they have other bindings (in this or other namespaces), those permissions remain. RBAC changes take effect instantly.
Can a ServiceAccount from another namespace be a subject?
Yes. You can grant permissions to a ServiceAccount from any namespace. Specify both the name and namespace in the subject. The ServiceAccount will have permissions in the RoleBinding’s namespace.
What happens if the referenced Role doesn't exist?
The RoleBinding is created but grants no permissions. Subjects will not have access to any resources until the referenced Role is created. Kubernetes does not validate that the roleRef exists.