100% Latest & Updated CNCF CKA Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 30
A ClusterRoleBinding points to ClusterRole read-nodes, which authorizes get on cluster-scoped nodes. A team replaces the binding with a RoleBinding in namespace ops. What are the implications? Choose ONE answer.
- The RoleBinding cannot grant access to cluster-scoped Node resources.
- ClusterRoleBinding automatically grants delete on Nodes.
- The binding grants get on Nodes only whose names start with ops.
- A RoleBinding makes Nodes namespaced in ops.
Explanation
Correct Answer
A:A namespaced binding cannot grant cluster-scoped permissions.
Incorrect Answers
B:Binding does not introduce verbs absent from the ClusterRole.
C:Namespace names cannot scope Node identity.
D:Node objects are always cluster-scoped.
Question 31
A monitoring identity needs GET access to `/metrics` on the API server without namespace resource access. What RBAC rule shape is appropriate? Choose ONE answer.
- A ServiceAccount annotation enabling metrics access.
- A namespaced Role granting get on Pods.
- A ClusterRole with nonResourceURLs and GET, bound cluster-wide.
- A RoleBinding in monitoring listing configmaps.
Explanation
Correct Answer
C:Non-resource URL rules apply at cluster scope and use nonResourceURLs rather than namespaced resources.
Incorrect Answers
A:Annotations do not create RBAC grants by themselves.
B:Pod resource authorization does not grant GET on the non-resource /metrics path.
D:A namespaced resource grant does not authorize a cluster-scoped URL.
Question 32
In namespace `platform`, a RoleBinding refers to the Role `review-47`, whose rule grants `get` on `pods/log` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `beta/report-agent`. The binding is in `platform`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- The same ServiceAccount has no authorization from this binding to perform `get` on `pods/log` in `gamma`.
- The binding grants `delete` on `pods/log` because the ServiceAccount can perform `get`.
- The binding grants `get` on `events` because it shares the same namespace.
- ServiceAccount `beta/report-agent` automatically gains `get` on `pods/log` in every namespace.
Explanation
Correct Answer
A:A RoleBinding grants permissions only in its own namespace `platform`, even if it refers to a ClusterRole. For this authorization request, the target grant namespace is platform, the rule specifies verb get on pods/log, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
Incorrect Answers
B:Kubernetes does not infer `delete` from `get`; each verb must be granted explicitly. For this authorization request, the target grant namespace is platform, the rule specifies verb get on pods/log, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
C:The rule names `pods/log`, not `events`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is platform, the rule specifies verb get on pods/log, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
D:The shown RoleBinding is scoped to `platform`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is platform, the rule specifies verb get on pods/log, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 33
An operator edits roleRef on an existing RoleBinding to switch from read-only ClusterRole to a write ClusterRole. The API rejects the update. Which interpretations are correct? Choose TWO statements.
- Editing roleRef grants permissions before API acceptance.
- The update fails because ClusterRoles cannot be referenced by RoleBindings.
- Recreating the binding with the intended roleRef is the supported change.
- roleRef is immutable for an existing binding.
- A privileged namespace label makes roleRef mutable.
Explanation
Correct Answers
C:Role-binding object replacement is used to change its referenced role.
D:RoleBinding roleRef cannot be updated in place.
Incorrect Answers
A:Rejected changes do not alter authorization state.
B:RoleBindings may reference ClusterRoles for namespace-scoped access.
E:No namespace label changes the immutability rule.
Question 34
A ClusterRole grants get on Pods and is referenced by a RoleBinding in finance to subject ServiceAccount jobs/shipper. Choose THREE true statements. Choose THREE answers.
- The permission automatically applies to every namespace.
- Any account named shipper gets the grant.
- shipper in jobs is the bound identity.
- The referenced ClusterRole may be reused by bindings elsewhere.
- The effective Pod get permission applies in finance.
- The binding automatically allows Pod delete.
Explanation
Correct Answers
C:The ServiceAccount subject includes its explicit jobs namespace.
D:ClusterRole definitions can be referenced from multiple RoleBindings or ClusterRoleBindings.
E:The RoleBinding namespace limits the namespaced resource grant.
Incorrect Answers
A:A RoleBinding does not broaden scope because the roleRef kind is ClusterRole.
B:ServiceAccounts in separate namespaces are different identities.
F:Only the referenced get verb is granted by this rule.
Question 35
In namespace `platform`, a RoleBinding refers to the Role `review-52`, 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 `platform`, 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 `update` on `deployments` because it shares the same namespace.
- The binding grants `get` on `configmaps` because the ServiceAccount can perform `update`.
- ServiceAccount `gamma/nightly-job` can perform `update` on `configmaps` in `platform`.
Explanation
Correct Answer
D:The RoleBinding in `platform` selects exactly that ServiceAccount identity and the rule grants `update` on `configmaps` within this namespace.
Incorrect Answers
A:The shown RoleBinding is scoped to `platform`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is platform, 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:The rule names `configmaps`, not `deployments`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is platform, the rule specifies verb update on configmaps, the subject is gamma/nightly-job. RBAC evaluates the verb, resource, group, subject and binding scope together.
C:Kubernetes does not infer `get` from `update`; each verb must be granted explicitly. For this authorization request, the target grant namespace is platform, 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 36
In namespace `finance`, a RoleBinding refers to the Role `review-54`, whose rule grants `create` on `jobs` in API group `batch`; its subject is ServiceAccount `sandbox/ci-runner`. 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 `create` on `pods/exec` because it shares the same namespace.
- This binding alone does not grant `update` on `jobs` in `finance`.
- ServiceAccount `sandbox/ci-runner` automatically gains `create` on `jobs` in every namespace.
- The binding grants `update` on `jobs` because the ServiceAccount can perform `create`.
Explanation
Correct Answer
B:RBAC rules are additive and verb-specific; `update` is absent while `create` is the only listed verb for `jobs`. For this authorization request, the target grant namespace is finance, the rule specifies verb create on jobs, the subject is sandbox/ci-runner. RBAC evaluates the verb, resource, group, subject and binding scope together.
Incorrect Answers
A:The rule names `jobs`, not `pods/exec`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is finance, the rule specifies verb create on jobs, the subject is sandbox/ci-runner. RBAC evaluates the verb, resource, group, subject and binding scope together.
C: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 jobs, the subject is sandbox/ci-runner. RBAC evaluates the verb, resource, group, subject and binding scope together.
D: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 jobs, the subject is sandbox/ci-runner. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 37
In namespace `alpha`, a RoleBinding refers to the Role `review-55`, whose rule grants `get` on `services` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `beta/report-agent`. The binding is in `alpha`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- The binding grants `create` on `services` because the ServiceAccount can perform `get`.
- The binding grants `get` on `secrets` because it shares the same namespace.
- ServiceAccount `beta/report-agent` can perform `get` on `services` in `alpha`.
- ServiceAccount `beta/report-agent` automatically gains `get` on `services` in every namespace.
Explanation
Correct Answer
C:The RoleBinding in `alpha` selects exactly that ServiceAccount identity and the rule grants `get` on `services` within this namespace.
Incorrect Answers
A:Kubernetes does not infer `create` from `get`; each verb must be granted explicitly. For this authorization request, the target grant namespace is alpha, the rule specifies verb get on services, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:The rule names `services`, not `secrets`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is alpha, the rule specifies verb get on services, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
D:The shown RoleBinding is scoped to `alpha`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is alpha, the rule specifies verb get on services, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 38
A user can get Pods in staging but receives Forbidden when calling `kubectl logs` on one Pod. Which RBAC resource should be considered in the missing permission? Choose ONE answer.
- pods/status only.
- pods/log.
- pods/exec.
- events only.
Explanation
Correct Answer
B:Reading logs is authorized against the Pod log subresource rather than implicitly by get on Pods.
Incorrect Answers
A:Pod status and logs are different subresources with independent authorization.
C:Exec opens commands in a container; it is a distinct subresource from logs.
D:Event permissions are separate from reading container logs.
Question 39
In namespace `gamma`, a RoleBinding refers to the Role `review-58`, whose rule grants `update` on `secrets` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `alpha/audit-reader`. The binding is in `gamma`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- ServiceAccount `alpha/audit-reader` automatically gains `update` on `secrets` in every namespace.
- The binding grants `get` on `secrets` because the ServiceAccount can perform `update`.
- The binding grants `update` on `pods/log` because it shares the same namespace.
- ServiceAccount `alpha/audit-reader` can perform `update` on `secrets` in `gamma`.
Explanation
Correct Answer
D:The RoleBinding in `gamma` selects exactly that ServiceAccount identity and the rule grants `update` on `secrets` within this namespace.
Incorrect Answers
A:The shown RoleBinding is scoped to `gamma`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is gamma, the rule specifies verb update on secrets, the subject is alpha/audit-reader. 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 gamma, the rule specifies verb update on secrets, the subject is alpha/audit-reader. 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 gamma, the rule specifies verb update on secrets, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 40
In namespace `beta`, a RoleBinding refers to the Role `review-63`, whose rule grants `watch` on `statefulsets` in API group `apps`; its subject is ServiceAccount `beta/report-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.
- ServiceAccount `beta/report-agent` automatically gains `watch` on `statefulsets` in every namespace.
- The binding grants `watch` on `configmaps` because it shares the same namespace.
- The binding grants `patch` on `statefulsets` because the ServiceAccount can perform `watch`.
- This binding alone does not grant `patch` on `statefulsets` in `beta`.
Explanation
Correct Answer
D:RBAC rules are additive and verb-specific; `patch` is absent while `watch` is the only listed verb for `statefulsets`. For this authorization request, the target grant namespace is beta, the rule specifies verb watch on statefulsets, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
Incorrect Answers
A: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 statefulsets, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:The rule names `statefulsets`, not `configmaps`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is beta, the rule specifies verb watch on statefulsets, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
C: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 statefulsets, the subject is beta/report-agent. RBAC evaluates the verb, resource, group, subject and binding scope together.
Certified Kubernetes Administrator (CKA) Practice Tests