100% Latest & Updated CNCF CKA Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 10
A Role grants patch on deployments in namespace staging. An operator tries kubectl rollout restart, which updates the Deployment Pod template. What are the correct permission boundaries? Choose ONE answer.
- A patch request to a Deployment requires matching patch authorization.
- Patch on Deployment grants cluster-wide patch on all workload resources.
- Having patch implies authorization to delete Deployments.
- A RoleBinding can turn a Role into a cluster-scope resource grant.
Explanation
Correct Answer
A:rollout restart ordinarily patches the Deployment template.
Incorrect Answers
B:The rule is limited to deployments in staging.
C:RBAC permissions do not imply unrelated verbs.
D:Roles cannot confer cluster-scoped permissions.
Question 11
A ServiceAccount has one RoleBinding granting `get` on Pods and a second RoleBinding granting `list` on Pods in the same namespace. One binding is applied after the other. Which permission set results? Choose ONE answer.
- Neither action, because two bindings on one subject conflict.
- Pod creation becomes authorized automatically.
- Both `get` and `list` are authorized by the combined additive rules.
- Only `list`, because the newer binding overrides the first.
Explanation
Correct Answer
C:RBAC grants accumulate; a later RoleBinding does not remove an earlier independent grant.
Incorrect Answers
A:Multiple RoleBindings for the same subject are supported and additive.
B:Neither rule grants `create`, so it cannot be inferred from read verbs.
D:RBAC has no last-wins replacement semantics across separate bindings.
Question 12
In namespace `finance`, a RoleBinding refers to the Role `review-18`, whose rule grants `create` on `pods` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `alpha/audit-reader`. The binding is in `finance`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- The binding grants `update` on `pods` because the ServiceAccount can perform `create`.
- The binding grants `create` on `services` because it shares the same namespace.
- This binding alone does not grant `update` on `pods` in `finance`.
- ServiceAccount `alpha/audit-reader` automatically gains `create` on `pods` in every namespace.
Explanation
Correct Answer
C:RBAC rules are additive and verb-specific; `update` is absent while `create` is the only listed verb for `pods`.
Incorrect Answers
A:Kubernetes does not infer `update` from `create`; each verb must be granted explicitly. For this authorization request, the target grant namespace is finance, the rule specifies verb create on pods, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:The rule names `pods`, not `services`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is finance, the rule specifies verb create on pods, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
D:The shown RoleBinding is scoped to `finance`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is finance, the rule specifies verb create on pods, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 13
A RoleBinding stored in reports references a Role there and lists subject ServiceAccount `ci/runner`. Choose TWO correct interpretations. Choose TWO answers.
- The subject is ci/runner rather than reports/runner.
- All ServiceAccounts named runner receive the grant.
- The RoleBinding grants access cluster-wide.
- The Role permissions are granted in reports.
- The Role is automatically copied to ci.
Explanation
Correct Answers
A:A ServiceAccount subject can name a different namespace explicitly.
D:RoleBinding namespace determines where namespaced resources may be accessed.
Incorrect Answers
B:ServiceAccount identity includes namespace, so identically named accounts differ.
C:A RoleBinding remains restricted to its own namespace.
E:A RoleBinding does not clone its referenced Role into a subject namespace.
Question 14
In namespace `observability`, a RoleBinding refers to the ClusterRole `review-21`, whose rule grants `watch` on `configmaps` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `platform/metrics-client`. The binding is in `observability`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- The binding grants `patch` on `configmaps` because the ServiceAccount can perform `watch`.
- The binding grants `watch` on `deployments` because it shares the same namespace.
- ServiceAccount `platform/metrics-client` automatically gains `watch` on `configmaps` in every namespace.
- This binding alone does not grant `patch` on `configmaps` in `observability`.
Explanation
Correct Answer
D:RBAC rules are additive and verb-specific; `patch` is absent while `watch` is the only listed verb for `configmaps`.
Incorrect Answers
A:Kubernetes does not infer `patch` from `watch`; each verb must be granted explicitly. For this authorization request, the target grant namespace is observability, the rule specifies verb watch on configmaps, the subject is platform/metrics-client. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:The rule names `configmaps`, not `deployments`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is observability, the rule specifies verb watch on configmaps, the subject is platform/metrics-client. RBAC evaluates the verb, resource, group, subject and binding scope together.
C:The shown RoleBinding is scoped to `observability`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole.
Question 15
A RoleBinding in `orders` names subject `kind: ServiceAccount`, `name: builder`, `namespace: ci`. A different ServiceAccount named builder exists in orders. Who actually receives the grant? Choose ONE answer.
- Only the ServiceAccount named builder in namespace ci, under the stated subject.
- The ServiceAccount builder in orders because the RoleBinding is stored there.
- The kubelet identity on every worker.
- Every ServiceAccount named builder in all namespaces.
Explanation
Correct Answer
A:A ServiceAccount subject identity includes its namespace and name; the RoleBinding namespace scopes resources, not the subject namespace.
Incorrect Answers
B:The binding’s namespace is not substituted for the explicit subject.namespace.
C:The named subject is a ServiceAccount, not the node’s kubelet client identity.
D:A ServiceAccount subject with a namespace does not wildcard across namespaces.
Question 16
An authenticated monitoring client needs GET access to the non-resource URL `/healthz` on the API server, but has no authorization. Which rule shape can grant the necessary permission? Choose ONE answer.
- A Service selector matching `app=healthz`.
- A namespaced Role granting `get` on resource `pods/healthz`.
- A ClusterRole with `nonResourceURLs: ["/healthz"]`, `verbs: ["get"]`, bound appropriately.
- A RoleBinding to a nonexistent Namespace named healthz.
Explanation
Correct Answer
C:Non-resource URL permissions are expressed through nonResourceURLs in a ClusterRole and granted cluster-wide.
Incorrect Answers
A:Service selectors route workloads and do not grant API non-resource URL authorization.
B:The API health endpoint is not a Pod subresource.
D:Namespace creation does not define the non-resource authorization rule.
Question 17
In namespace `beta`, a RoleBinding refers to the Role `review-27`, whose rule grants `watch` on `secrets` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `finance/deploy-agent`. The binding is in `beta`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- The binding grants `patch` on `secrets` because the ServiceAccount can perform `watch`.
- ServiceAccount `finance/deploy-agent` automatically gains `watch` on `secrets` in every namespace.
- The binding grants `watch` on `pods/log` because it shares the same namespace.
- This binding alone does not grant `patch` on `secrets` in `beta`.
Explanation
Correct Answer
D:RBAC rules are additive and verb-specific; `patch` is absent while `watch` is the only listed verb for `secrets`.
Incorrect Answers
A:Kubernetes does not infer `patch` from `watch`; each verb must be granted explicitly. For this authorization request, the target grant namespace is beta, the rule specifies verb watch on secrets, the subject is finance/deploy-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:The shown RoleBinding is scoped to `beta`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is beta, the rule specifies verb watch on secrets, the subject is finance/deploy-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
C:The rule names `secrets`, not `pods/log`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is beta, the rule specifies verb watch on secrets, the subject is finance/deploy-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 18
In namespace `sandbox`, a RoleBinding refers to the Role `review-28`, whose rule grants `update` on `configmaps` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `gamma/nightly-job`. The binding is in `sandbox`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- ServiceAccount `gamma/nightly-job` automatically gains `update` on `configmaps` in every namespace.
- The binding grants `get` on `configmaps` because the ServiceAccount can perform `update`.
- ServiceAccount `gamma/nightly-job` can perform `update` on `configmaps` in `sandbox`.
- The binding grants `update` on `deployments` because it shares the same namespace.
Explanation
Correct Answer
C:The RoleBinding in `sandbox` selects exactly that ServiceAccount identity and the rule grants `update` on `configmaps` within this namespace.
Incorrect Answers
A:The shown RoleBinding is scoped to `sandbox`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is sandbox, the rule specifies verb update on configmaps, the subject is gamma/nightly-job. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:Kubernetes does not infer `get` from `update`; each verb must be granted explicitly. For this authorization request, the target grant namespace is sandbox, the rule specifies verb update on configmaps, the subject is gamma/nightly-job. RBAC evaluates the verb, resource, group, subject and binding scope together.
D:The rule names `configmaps`, not `deployments`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is sandbox, the rule specifies verb update on configmaps, the subject is gamma/nightly-job. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 19
A ClusterRole contains nonResourceURLs: ["/healthz", "/healthz/*"] and verb get. A RoleBinding in default refers to it; the intended client must query /healthz/ready. Which statements are accurate? Choose ONE answer.
- A namespaced RoleBinding is enough for a cluster-scoped non-resource URL.
- The rule authorizes POST on /healthz/ready.
- Non-resource URLs require a ClusterRole and ClusterRoleBinding for cluster-scoped authorization.
- A ClusterRole with nonResourceURLs authorizes reading Secrets automatically.
Explanation
Correct Answer
C:A namespaced RoleBinding is not sufficient for a non-resource URL grant.
Incorrect Answers
A:RoleBinding grants only namespaced resource access.
B:Only the get verb is granted.
D:Non-resource URLs do not match Kubernetes resource paths.
Question 20
A reviewer wants to test whether ServiceAccount build/agent can delete Pods in namespace staging without deleting anything. Which RBAC validation conclusions are sound? Choose ONE answer.
- kubectl auth can-i grants the delete permission when it returns no.
- The check must delete a Pod to compute authorization.
- kubectl auth can-i delete pods -n staging --as=system:serviceaccount:build:agent is a targeted authorization check.
- Testing as system:serviceaccount:staging:agent checks build/agent.
Explanation
Correct Answer
C:Impersonation uses the exact service-account username format.
Incorrect Answers
A:The command evaluates effective authorization without changing grants.
B:SelfSubjectAccessReview performs an authorization query, not a deletion.
D:The service-account namespace is part of the identity string.
Certified Kubernetes Administrator (CKA) Practice Tests