Courseiva
Question 294 of 302

CKA Practice Question: Cluster Architecture, Installation and Configuration

An administrator is setting up RBAC to allow a CI/CD pipeline to create and delete pods only in the 'ci' namespace. Which combination of resources should be created?

⚠ Common exam trap

Test-takers frequently assume a ClusterRole is always needed for any pipeline or service account, but for namespace-scoped resources, a Role and RoleBinding are sufficient and more secure, and the exam tests understanding of scope versus permissions.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Role and RoleBinding

A Role and RoleBinding are the correct combination because the CI/CD pipeline needs to create and delete pods only within the 'ci' namespace. A Role defines permissions scoped to a specific namespace, and a RoleBinding grants those permissions to a user or service account within that same namespace. This ensures the pipeline cannot affect resources in other namespaces.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Role and RoleBinding

    Why this is correct

    This combination is the correct and most granular approach for granting permissions within a specific namespace. A `Role` defines a set of permissions (e.g., create pods, list deployments) that are strictly confined to the namespace where the `Role` is created. Subsequently, a `RoleBinding` links this namespace-scoped `Role` to a specific subject, such as a service account used by a CI/CD pipeline, thereby granting those defined permissions exclusively within that particular namespace. This adheres to the principle of least privilege by preventing unintended access to other parts of the cluster.

  • ClusterRole and RoleBinding

    Why it's wrong here

    This option fails because a `ClusterRole` grants permissions cluster-wide, which is too broad for the requirement of restricting pod creation/deletion solely to the 'ci' namespace. While a `RoleBinding` correctly scopes permissions to a namespace, the `ClusterRole` itself lacks the necessary namespace-specific restriction. This combination is tempting because it's the standard approach for granting cluster-level permissions to a specific namespace, but it's incorrect here due to the strict namespace boundary specified in the question.

  • ClusterRole and ClusterRoleBinding

    Why it's wrong here

    Using a `ClusterRole` paired with a `ClusterRoleBinding` grants permissions that are effective across the entire Kubernetes cluster, not just within a single namespace. A `ClusterRole` defines permissions for cluster-scoped resources (like nodes) or for namespaced resources *across all namespaces*. Binding this `ClusterRole` via a `ClusterRoleBinding` would provide the CI/CD pipeline with broad, cluster-wide access, which is excessive and insecure if the pipeline only needs to operate within a designated namespace.

  • Role and ClusterRoleBinding

    Why it's wrong here

    This combination is fundamentally incorrect and will not function as intended within Kubernetes RBAC. A `Role` is a namespace-scoped resource, meaning its permissions are defined and applicable only within a single namespace. Conversely, a `ClusterRoleBinding` is designed exclusively to grant *cluster-scoped* permissions, which are defined by a `ClusterRole`, to a subject across the entire cluster. You cannot bind a namespace-scoped `Role` using a `ClusterRoleBinding`; such an attempt would result in a validation error because a `ClusterRoleBinding`'s `roleRef` field must point to a `ClusterRole`.

Quick reference

Access Control Model Comparison

ModelAcronymWho Controls Access?Best For
Discretionary Access ControlDACResource ownerSmall teams, file shares
Mandatory Access ControlMACSystem / security labelsClassified govt / military
Role-Based Access ControlRBACAdministrator (via roles)Enterprise environments
Attribute-Based Access ControlABACPolicy engine (user + resource attributes)Fine-grained, dynamic policies
Rule-Based Access ControlRuBACSystem rules / ACLsFirewall rules, network ACLs

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CKA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKA exam.