CNCF CKA Practice Test 1
Question 1
An administrator reviews several possible responses to this condition: A controller ServiceAccount needs to read ConfigMaps only in team-a. Which option creates an avoidable failure?
- Choose a storage access mode backed by real CSI capabilities.
- Apply scoped access rather than granting universal administration.
- Bind the cluster-admin ClusterRole to the controller for convenience.
- Record a rollback approach before high-impact control-plane changes.
Explanation
Correct Answer
C:Bind the cluster-admin ClusterRole to the controller for convenience. ServiceAccount identity does not automatically confer application-specific API permissions. A safer course is: Bind a narrowly scoped Role to the controller ServiceAccount in team-a.
Incorrect Answers
A:Choose a storage access mode backed by real CSI capabilities. Requested volume semantics still depend on the storage implementation. For the stated case, a focused correction is: Bind a narrowly scoped Role to the controller ServiceAccount in team-a.
B:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Bind a narrowly scoped Role to the controller ServiceAccount in team-a.
D:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Bind a narrowly scoped Role to the controller ServiceAccount in team-a.
Question 2
Following this Kubernetes scenario, an operator validates remediation: A team has an etcd snapshot but no rehearsed recovery procedure. Which measurable outcome shows success?
- A recovered test control plane reads expected resources and the plan records measured recovery steps.
- kubeadm uses the correct runtime endpoint and container creation succeeds.
- Kubelet connects successfully to the runtime and new Pods start.
- The node becomes Ready and ordinary Pods receive reachable Pod IPs.
Explanation
Correct Answer
A:A recovered test control plane reads expected resources and the plan records measured recovery steps. The corresponding action is: Perform an isolated restore rehearsal with documented credentials, manifest paths and validation checks.
Incorrect Answers
B:Kubeadm uses the correct runtime endpoint and container creation succeeds. This is evidence for a separate case (kubeadm reports multiple CRI sockets and cannot select the runtime.), not for the target problem. An appropriate validation would be: A recovered test control plane reads expected resources and the plan records measured recovery steps.
C:Kubelet connects successfully to the runtime and new Pods start. This is evidence for a separate case (A node image update changes the runtime socket and kubelet can no longer create containers.), not for the target problem. An appropriate validation would be: A recovered test control plane reads expected resources and the plan records measured recovery steps.
D:The node becomes Ready and ordinary Pods receive reachable Pod IPs. This is evidence for a separate case (A new control-plane node initializes but Pods will not receive Pod network addresses.), not for the target problem. An appropriate validation would be: A recovered test control plane reads expected resources and the plan records measured recovery steps.
Question 3
Select TWO technically sound statements for this situation, covering remediation and validation: A StatefulSet is decommissioned but its underlying audit volume must remain for investigation.
- Validation: Deleting the PVC does not automatically delete the underlying retained storage.
- Remediation: Set reclaimPolicy Retain and manage retained PV and backend data under approved procedure.
- Remediation: Align the claim and PV storageClassName and required volume characteristics for static binding.
- Validation: A second Pod attempting the same PVC is denied or remains unschedulable.
- Remediation: Use Delete reclaim policy and assume data persists by default.
Explanation
Correct Answers
A:Validation: Deleting the PVC does not automatically delete the underlying retained storage. This result verifies the behavior the remediation is supposed to restore.
B:Remediation: Set reclaimPolicy Retain and manage retained PV and backend data under approved procedure. The remedy targets the reported failure rather than a different subsystem. Retain preserves data resources for explicit lifecycle handling after claim deletion.
Incorrect Answers
C:Remediation: Align the claim and PV storageClassName and required volume characteristics for static binding. This action targets a different condition (A manually created PV is available but a PVC specifying an unmatched StorageClass never binds.), not this reported failure: A StatefulSet is decommissioned but its underlying audit volume must remain for investigation.
D:Validation: A second Pod attempting the same PVC is denied or remains unschedulable. This evidence applies to a different condition (A database requires exclusive access by exactly one Pod to a PVC.), and would not verify this target fix: A StatefulSet is decommissioned but its underlying audit volume must remain for investigation.
E:Remediation: Use Delete reclaim policy and assume data persists by default. This is the unsafe shortcut for the case, not an acceptable intervention. Retain preserves data resources for explicit lifecycle handling after claim deletion.
Question 4
Consider the following Kubernetes administration case: After a certificate renewal, an old static Pod process still uses expired credentials. Which principle BEST explains the intended solution?
- Renewed certificate files may not be reloaded until components restart.
- kubeadm bootstraps control-plane components; a compatible CNI provides Pod networking.
- Expired control-plane credentials can break otherwise healthy components.
- RBAC permissions are granted through role bindings and scoped to intended subjects and namespaces.
Explanation
Correct Answer
A:Renewed certificate files may not be reloaded until components restart. This principle explains the targeted result. A concrete response is: Ensure the affected component reloads renewed credentials through an approved restart or manifest-triggered recreation.
Incorrect Answers
B:This principle is useful for another case (A new control-plane node initializes but Pods will not receive Pod network addresses.), but does not explain the most direct solution here. Renewed certificate files may not be reloaded until components restart.
C:This principle is useful for another case (An API client certificate is about to expire on a kubeadm managed control plane.), but does not explain the most direct solution here. Renewed certificate files may not be reloaded until components restart.
D:This principle is useful for another case (A namespace user can list Pods in dev but receives Forbidden in prod.), but does not explain the most direct solution here. Renewed certificate files may not be reloaded until components restart.
Question 5
To avoid guessing about this fault, what should be inspected first? An etcd snapshot is valid but the restored control plane is reading an empty data directory.
- Use kubectl auth can-i list pods -n prod --as=developer and repeat against an unauthorized namespace.
- Inspect etcdutl snapshot restore output, etcd manifest hostPath and etcd logs.
- Run kubeadm token list on the control plane and use kubeadm token create --print-join-command.
- Check operator logs, controller events and the custom resource status conditions.
Explanation
Correct Answer
B:Inspect etcdutl snapshot restore output, etcd manifest hostPath and etcd logs. This diagnostic examines the relevant resource or subsystem. Backup usefulness depends on using restored state in the active etcd configuration. The validating result would be: The etcd member starts from restored data and expected Kubernetes API resources reappear.
Incorrect Answers
A:This check is appropriate to the separate problem (A namespace user can list Pods in dev but receives Forbidden in prod.), but it is not the direct diagnostic for the described failure. Inspect etcdutl snapshot restore output, etcd manifest hostPath and etcd logs.
C:This check is appropriate to the separate problem (A new worker cannot join because its bootstrap token has expired.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (A custom resource exists but a controller is not reconciling its desired state.), but it is not the direct diagnostic for the described failure.
Question 6
Consider the following Kubernetes administration case: A worker unexpectedly becomes NotReady following a network maintenance event. Which principle BEST explains the intended solution?
- Node readiness is driven by kubelet heartbeats and node health signals.
- Control-plane API responsiveness depends on healthy etcd persistence and quorum.
- Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage.
- Required node affinity is a hard placement constraint.
Explanation
Correct Answer
A:Node readiness is driven by kubelet heartbeats and node health signals. This principle explains the targeted result. A concrete response is: Check kubelet status, node heartbeats and API server reachability from that worker.
Incorrect Answers
B:This principle is useful for another case (The API server is slow and logs show etcd request timeouts.), but does not explain the most direct solution here. Node readiness is driven by kubelet heartbeats and node health signals.
C:This principle is useful for another case (A node appears idle by CPU usage but a new Pod is unschedulable with Insufficient cpu.), but does not explain the most direct solution here. Node readiness is driven by kubelet heartbeats and node health signals.
D:Required node affinity is a hard placement constraint. This principle is useful for another case (A Pod requests a non-existent node label through required node affinity.), but does not explain the most direct solution here. The governing consideration is: Node readiness is driven by kubelet heartbeats and node health signals.
Question 7
A review finds this Kubernetes issue: Only Pods selected by a new egress policy fail DNS while other Pods resolve normally. Which suggestion would make troubleshooting or security worse?
- Delete all ingress policies and assume egress DNS is repaired.
- Inspect Pod and component events before changing unrelated resources.
- Choose a storage access mode backed by real CSI capabilities.
- Verify the target cluster and namespace before mutating resources.
Explanation
Correct Answer
A:Delete all ingress policies and assume egress DNS is repaired. NetworkPolicy egress isolation can block DNS dependencies. A safer course is: Allow required DNS egress to the cluster resolver while retaining intended isolation.
Incorrect Answers
B:Inspect Pod and component events before changing unrelated resources. Observed events help locate the failing subsystem before a change. For the stated case, a focused correction is: Allow required DNS egress to the cluster resolver while retaining intended isolation.
C:Choose a storage access mode backed by real CSI capabilities. Requested volume semantics still depend on the storage implementation. For the stated case, a focused correction is: Allow required DNS egress to the cluster resolver while retaining intended isolation.
D:Verify the target cluster and namespace before mutating resources. Explicit target context avoids changing the wrong environment. For the stated case, a focused correction is: Allow required DNS egress to the cluster resolver while retaining intended isolation.
Question 8
A Kubernetes operator wants to verify this condition: ReplicaSets stop creating replacement Pods after kube-controller-manager crashes. Which investigation step is BEST suited to the case?
- Inspect kubectl describe hpa conditions and kubectl top pods.
- Inspect kubectl config view --minify and certificate notAfter dates.
- Compare ClusterIP and direct Pod tests from affected and healthy nodes.
- Inspect kube-controller-manager static Pod logs and Deployment status conditions.
Explanation
Correct Answer
D:Inspect kube-controller-manager static Pod logs and Deployment status conditions. This diagnostic examines the relevant resource or subsystem. Kubernetes controllers implement desired-state reconciliation. The validating result would be: Replica controllers reconcile desired Pods and restore replica counts.
Incorrect Answers
A:Inspect kubectl describe hpa conditions and kubectl top pods. This check is appropriate to the separate problem (HPA displays <unknown> target metrics while replicas never scale.), but it is not the direct diagnostic for the described failure. The relevant check is: Inspect kube-controller-manager static Pod logs and Deployment status conditions.
B:Inspect kubectl config view --minify and certificate notAfter dates. This check is appropriate to the separate problem (kubectl reports x509 certificate expired after months of successful access.), but it is not the direct diagnostic for the described failure. The relevant check is: Inspect kube-controller-manager static Pod logs and Deployment status conditions.
C:This check is appropriate to the separate problem (Service ClusterIP connections fail on one node even though direct Pod IP connections work.), but it is not the direct diagnostic for the described failure. Inspect kube-controller-manager static Pod logs and Deployment status conditions.
Question 9
A platform engineer receives this incident: A proposed upgrade would run kubelet newer than kube-apiserver. Which change should be made first after validating the facts?
- Cordon and drain the node with appropriate eviction safeguards before maintenance.
- Inspect a pinned chart with helm template or helm diff style review before installation.
- Reject the unsupported skew and follow the documented Kubernetes component version-skew policy.
- Inspect available kubeconfig contexts and explicitly select or specify the intended context.
Explanation
Correct Answer
C:Reject the unsupported skew and follow the documented Kubernetes component version-skew policy. This correction targets the specific failure. Kubelet must not be newer than its kube-apiserver under normal supported skew rules. A successful result is: Control-plane and node versions remain within supported relationships after rollout.
Incorrect Answers
A:This procedure belongs to a different Kubernetes condition (A worker requires OS maintenance while running replicated customer Pods.). Cordon and drain the node with appropriate eviction safeguards before maintenance.
B:This procedure belongs to a different Kubernetes condition (A Helm chart update is proposed but its rendered RBAC is unknown.). Inspect a pinned chart with helm template or helm diff style review before installation.
D:This procedure belongs to a different Kubernetes condition (A kubectl command is applying objects in the wrong environment after a context switch.). Inspect available kubeconfig contexts and explicitly select or specify the intended context.
Question 10
Consider the following Kubernetes administration case: An API must accept ingress only from Pods labeled role=client in namespace team-a. Which principle BEST explains the intended solution?
- Service selectors and readiness determine which Pods become eligible endpoints.
- A single NetworkPolicy peer combining namespaceSelector and podSelector intersects their selection criteria.
- Gateway listeners own TLS configuration and certificate references must resolve.
- Port forwarding is a debugging tunnel, not an internet-facing production endpoint.
Explanation
Correct Answer
B:A single NetworkPolicy peer combining namespaceSelector and podSelector intersects their selection criteria. This principle explains the targeted result. A concrete response is: Create an ingress policy selecting the API Pods with combined namespaceSelector and podSelector peer criteria.
Incorrect Answers
A:This principle is useful for another case (A Service exists but its EndpointSlice contains no addresses even though backend Pods are running.), but does not explain the most direct solution here. A single NetworkPolicy peer combining namespaceSelector and podSelector intersects their selection criteria.
C:Gateway listeners own TLS configuration and certificate references must resolve. This principle is useful for another case (A Gateway HTTPS listener reports invalid certificate references.), but does not explain the most direct solution here. The governing consideration is: A single NetworkPolicy peer combining namespaceSelector and podSelector intersects their selection criteria.
D:This principle is useful for another case (An operator wants temporary access to an internal Pod without publishing a public Service.), but does not explain the most direct solution here. A single NetworkPolicy peer combining namespaceSelector and podSelector intersects their selection criteria.