Bird
0
0

What is the main difference between a RoleBinding and a ClusterRoleBinding in Kubernetes?

easy📝 Conceptual Q11 of 15
Kubernetes - RBAC and Security
What is the main difference between a RoleBinding and a ClusterRoleBinding in Kubernetes?
A<code>RoleBinding</code> and <code>ClusterRoleBinding</code> are exactly the same.
B<code>RoleBinding</code> grants permissions cluster-wide, while <code>ClusterRoleBinding</code> grants permissions within a single namespace.
C<code>RoleBinding</code> is used only for system users, <code>ClusterRoleBinding</code> is for regular users.
D<code>RoleBinding</code> grants permissions within a single namespace, while <code>ClusterRoleBinding</code> grants permissions cluster-wide.
Step-by-Step Solution
Solution:
  1. Step 1: Understand RoleBinding scope

    RoleBinding assigns permissions only inside one namespace.
  2. Step 2: Understand ClusterRoleBinding scope

    ClusterRoleBinding assigns permissions across the entire cluster, not limited to a namespace.
  3. Final Answer:

    RoleBinding is namespace-scoped; ClusterRoleBinding is cluster-scoped. -> Option D
  4. Quick Check:

    Scope difference = RoleBinding grants permissions within a single namespace, while ClusterRoleBinding grants permissions cluster-wide. [OK]
Quick Trick: Remember: RoleBinding = namespace, ClusterRoleBinding = whole cluster [OK]
Common Mistakes:
  • Confusing the scope of RoleBinding and ClusterRoleBinding
  • Thinking both bindings work cluster-wide
  • Assuming RoleBinding is for system users only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes