Which statement accurately describes the difference between Roles and ClusterRoles in Kubernetes?

Study for the Kubernetes Cloud Native Associate (KCNA) Certification. Prepare with flashcards and multiple choice questions. Ensure success with detailed explanations. Ready for your exam!

Multiple Choice

Which statement accurately describes the difference between Roles and ClusterRoles in Kubernetes?

Explanation:
Roles and ClusterRoles define who can do what to which resources in Kubernetes, and they differ mainly in scope. Roles are namespace-scoped, meaning they specify permissions that apply only within a single namespace. ClusterRoles, in contrast, describe permissions that exist at the cluster level and can apply across all namespaces. You can attach a ClusterRole to a subject in a specific namespace using a RoleBinding, or grant those same cluster-wide permissions across the entire cluster with a ClusterRoleBinding. This distinction is the essence: permissions confined to a namespace versus permissions that span the whole cluster.

Roles and ClusterRoles define who can do what to which resources in Kubernetes, and they differ mainly in scope. Roles are namespace-scoped, meaning they specify permissions that apply only within a single namespace. ClusterRoles, in contrast, describe permissions that exist at the cluster level and can apply across all namespaces. You can attach a ClusterRole to a subject in a specific namespace using a RoleBinding, or grant those same cluster-wide permissions across the entire cluster with a ClusterRoleBinding. This distinction is the essence: permissions confined to a namespace versus permissions that span the whole cluster.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy