100% Latest & Updated CNCF CKA Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
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.
Question 41
An aggregated ClusterRole has an aggregationRule selecting other ClusterRoles by label. An administrator manually removes a rule from its rules field, but the rule returns. Which conclusions follow? Choose ONE answer.
- The aggregation controller manages the rules of an aggregated ClusterRole.
- Namespace labels determine a cluster-wide aggregate.
- Aggregation automatically creates a ClusterRoleBinding for all users.
- The aggregation mechanism applies only to Roles, not ClusterRoles.
Explanation
Correct Answer
A:It writes computed rules from matching source ClusterRoles.
Incorrect Answers
B:Aggregated ClusterRoles use labels on ClusterRole resources.
C:Aggregation only computes permissions; bindings still grant them.
D:Kubernetes supports ClusterRole aggregation specifically.
Question 42
In namespace `alpha`, a RoleBinding refers to the ClusterRole `review-65`, whose rule grants `patch` on `deployments` in API group `apps`; its subject is ServiceAccount `delta/build-bot`. 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 `patch` on `jobs` because it shares the same namespace.
- The binding grants `delete` on `deployments` because the ServiceAccount can perform `patch`.
- ServiceAccount `delta/build-bot` automatically gains `patch` on `deployments` in every namespace.
- The same ServiceAccount has no authorization from this binding to perform `patch` on `deployments` in `beta`.
Explanation
Correct Answer
D:A RoleBinding grants permissions only in its own namespace `alpha`, even if it refers to a ClusterRole. For this authorization request, the target grant namespace is alpha, the rule specifies verb patch on deployments, the subject is delta/build-bot. RBAC evaluates the verb, resource, group, subject and binding scope together.
Incorrect Answers
A:The rule names `deployments`, not `jobs`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is alpha, the rule specifies verb patch on deployments, the subject is delta/build-bot. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:Kubernetes does not infer `delete` from `patch`; each verb must be granted explicitly. For this authorization request, the target grant namespace is alpha, the rule specifies verb patch on deployments, the subject is delta/build-bot. RBAC evaluates the verb, resource, group, subject and binding scope together.
C: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 patch on deployments, the subject is delta/build-bot. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 43
In namespace `delta`, a RoleBinding refers to the Role `review-66`, 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 `delta`, 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 `create` on `pods` in every namespace.
- This binding alone does not grant `update` on `pods` in `delta`.
- The binding grants `create` on `services` because it shares the same namespace.
- The binding grants `update` on `pods` 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 `pods`. For this authorization request, the target grant namespace is delta, the rule specifies verb create on pods, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
Incorrect Answers
A:The shown RoleBinding is scoped to `delta`; a cluster-wide permission on namespaced resources would require a ClusterRoleBinding to an appropriate ClusterRole. For this authorization request, the target grant namespace is delta, the rule specifies verb create on pods, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
C:The rule names `pods`, not `services`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is delta, 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:Kubernetes does not infer `update` from `create`; each verb must be granted explicitly. For this authorization request, the target grant namespace is delta, 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 44
A Pod runs with serviceAccountName: builder in namespace batch. Its API request receives Forbidden. The RoleBinding subject mistakenly uses namespace default. Which statements are accurate? Choose ONE answer.
- Every builder ServiceAccount across all namespaces is the same user.
- The role permission is automatically inherited by batch because the Pod runs there.
- The expected subject identity is system:serviceaccount:batch:builder.
- Creating an ImagePullSecret alters the API authorization identity.
Explanation
Correct Answer
C:A Pod service-account username includes its actual namespace.
Incorrect Answers
A:ServiceAccount identities are namespaced.
B:A mismatched binding subject is not authorized simply through Pod placement.
D:Image registry credentials are separate from service-account RBAC grants.
Question 45
An administrator wants to run `kubectl auth can-i create deployments --as=alice` to test Alice’s grants, but impersonation is forbidden. Which extra authorization is relevant to performing this test? Choose ONE answer.
- A change to Alice’s default namespace.
- Permission to delete every Deployment.
- Permission to impersonate the chosen user identity.
- A RoleBinding that assigns Alice the cluster-admin role.
Explanation
Correct Answer
C:The --as request is subject to impersonation authorization independently of Alice’s deployment grants.
Incorrect Answers
A:A namespace selection does not grant the impersonation verb.
B:Deployment deletion is unrelated to impersonating a user for authorization review.
D:Elevating the subject is neither needed nor appropriate for testing her existing access.
Question 46
A Role in accounting allows get and update for ConfigMap `rates` using `resourceNames: [rates]`. Choose TWO statements that match this rule, assuming no other grants. Choose TWO answers.
- GET all ConfigMaps in accounting is permitted.
- UPDATE on accounting/rates is permitted.
- UPDATE a Secret named rates is permitted.
- GET on accounting/rates is permitted.
- CREATE a new rates ConfigMap is allowed by the named grant.
Explanation
Correct Answers
B:Update is explicitly granted for that named ConfigMap.
D:The resource, named object and get verb match the Role.
Incorrect Answers
A:The named-object restriction does not allow unconstrained list or other objects.
C:A Secret is not the ConfigMap resource covered by the Role.
E:Create requests have no existing resource name to match this restriction.
Question 47
An identity has RoleBinding A granting get on Services and RoleBinding B granting list on Services, both in staging. It has no other permissions. Choose THREE true outcomes. Choose THREE answers.
- Binding B revokes binding A.
- LIST of Services in staging may succeed.
- GET of a named Service in staging may succeed.
- The identity automatically gains update on Endpoints.
- Neither binding grants delete on a Service.
- The identity can list Services in production.
Explanation
Correct Answers
B:The list verb is independently granted by binding B.
C:The get verb is granted by binding A.
E:RBAC grants only the listed verbs and there is no implicit delete.
Incorrect Answers
A:RBAC grants are additive rather than sequential overrides.
D:A Service list/get grant does not imply mutation of another resource.
F:The bindings are namespaced to staging.
Question 48
In namespace `beta`, a RoleBinding refers to the ClusterRole `review-73`, whose rule grants `get` on `pods` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `delta/build-bot`. 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 `get` on `services` because it shares the same namespace.
- ServiceAccount `delta/build-bot` can perform `get` on `pods` in `beta`.
- ServiceAccount `delta/build-bot` automatically gains `get` on `pods` in every namespace.
- The binding grants `create` on `pods` because the ServiceAccount can perform `get`.
Explanation
Correct Answer
B:The RoleBinding in `beta` selects exactly that ServiceAccount identity and the rule grants `get` on `pods` within this namespace.
Incorrect Answers
A:The rule names `pods`, not `services`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is beta, the rule specifies verb get on pods, the subject is delta/build-bot. RBAC evaluates the verb, resource, group, subject and binding scope together.
C: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 get on pods, the subject is delta/build-bot. RBAC evaluates the verb, resource, group, subject and binding scope together.
D:Kubernetes does not infer `create` from `get`; each verb must be granted explicitly. For this authorization request, the target grant namespace is beta, the rule specifies verb get on pods, the subject is delta/build-bot. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 49
In namespace `sandbox`, a RoleBinding refers to the Role `review-74`, whose rule grants `create` on `pods/exec` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `alpha/audit-reader`. The binding is in `sandbox`, and no other RBAC grants exist. Determine the effective access and the boundaries of this grant. Choose ONE statement.
- The binding grants `create` on `statefulsets` because it shares the same namespace.
- The same ServiceAccount has no authorization from this binding to perform `create` on `pods/exec` in `observability`.
- The binding grants `watch` on `pods/exec` because the ServiceAccount can perform `create`.
- ServiceAccount `alpha/audit-reader` automatically gains `create` on `pods/exec` in every namespace.
Explanation
Correct Answer
B:A RoleBinding grants permissions only in its own namespace `sandbox`, even if it refers to a ClusterRole. For this authorization request, the target grant namespace is sandbox, the rule specifies verb create on pods/exec, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
Incorrect Answers
A:The rule names `pods/exec`, not `statefulsets`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is sandbox, the rule specifies verb create on pods/exec, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
C:Kubernetes does not infer `watch` from `create`; each verb must be granted explicitly. For this authorization request, the target grant namespace is sandbox, the rule specifies verb create on pods/exec, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
D: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 create on pods/exec, the subject is alpha/audit-reader. RBAC evaluates the verb, resource, group, subject and binding scope together.
Question 50
In namespace `finance`, a RoleBinding refers to the ClusterRole `review-77`, whose rule grants `patch` on `events` in the core API group (`apiGroups: [""]` in RBAC YAML); its subject is ServiceAccount `platform/metrics-client`. 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 `patch` on `pods` because it shares the same namespace.
- The binding grants `delete` on `events` because the ServiceAccount can perform `patch`.
- ServiceAccount `platform/metrics-client` automatically gains `patch` on `events` in every namespace.
- The same ServiceAccount has no authorization from this binding to perform `patch` on `events` in `platform`.
Explanation
Correct Answer
D:A RoleBinding grants permissions only in its own namespace `finance`, even if it refers to a ClusterRole. For this authorization request, the target grant namespace is finance, the rule specifies verb patch on events, the subject is platform/metrics-client. RBAC evaluates the verb, resource, group, subject and binding scope together.
Incorrect Answers
A:The rule names `events`, not `pods`; matching namespace alone does not add RBAC resources. For this authorization request, the target grant namespace is finance, the rule specifies verb patch on events, the subject is platform/metrics-client. RBAC evaluates the verb, resource, group, subject and binding scope together.
B:Kubernetes does not infer `delete` from `patch`; each verb must be granted explicitly. For this authorization request, the target grant namespace is finance, the rule specifies verb patch on events, the subject is platform/metrics-client. 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 patch on events, the subject is platform/metrics-client. RBAC evaluates the verb, resource, group, subject and binding scope together.
Certified Kubernetes Administrator (CKA) Practice Tests