CNCF CKA Practice Test 21
Question 200
A Kubernetes operator wants to verify this condition: HPA reports unknown CPU utilization although Pods are running. Which investigation step is BEST suited to the case?
- Run kubectl top pods and inspect HPA conditions and Pod CPU requests.
- Inspect kubectl get pod -o yaml for secretKeyRef or secret volumes and test RBAC access.
- Inspect kubectl describe pod for FailedScheduling and kubectl describe nodes allocatable.
- Inspect Pod nodeAffinity and the actual node selected under controlled scheduling tests.
Explanation
Correct Answer
A:Run kubectl top pods and inspect HPA conditions and Pod CPU requests. This diagnostic examines the relevant resource or subsystem. CPU utilization-based HPA calculations need requests and available resource metrics. The validating result would be: HPA displays utilization rather than unknown and computes a recommendation.
Incorrect Answers
B:This check is appropriate to the separate problem (An application password is mistakenly embedded in a ConfigMap and exposed to broad readers.), but it is not the direct diagnostic for the described failure. Run kubectl top pods and inspect HPA conditions and Pod CPU requests.
C:This check is appropriate to the separate problem (A Pod is Pending because requested memory exceeds all node allocatable resources.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (A workload prefers zone-b for latency but can operate in other zones.), but it is not the direct diagnostic for the described failure.
Question 201
Following this Kubernetes scenario, an operator validates remediation: A kubeadm managed cluster must move one supported minor release forward. Which measurable outcome shows success?
- The control plane reports the intended version before worker upgrades proceed safely.
- A recovered test control plane reads expected resources and the plan records measured recovery steps.
- Snapshot status is readable and the backup is protected and recoverable.
- Network add-on handles Pod routes while the runtime handles container lifecycle.
Explanation
Correct Answer
A:The control plane reports the intended version before worker upgrades proceed safely. The corresponding action is: Plan the ordered control-plane upgrade using kubeadm upgrade plan and supported version skew guidance.
Incorrect Answers
B:A recovered test control plane reads expected resources and the plan records measured recovery steps. This is evidence for a separate case (A team has an etcd snapshot but no rehearsed recovery procedure.), not for the target problem. An appropriate validation would be: The control plane reports the intended version before worker upgrades proceed safely.
C:Snapshot status is readable and the backup is protected and recoverable. This is evidence for a separate case (A stacked-etcd control plane needs a recoverable snapshot before upgrade.), not for the target problem. An appropriate validation would be: The control plane reports the intended version before worker upgrades proceed safely.
D:Network add-on handles Pod routes while the runtime handles container lifecycle. This is evidence for a separate case (A team mistakes the container network interface for the container runtime interface.), not for the target problem. An appropriate validation would be: The control plane reports the intended version before worker upgrades proceed safely.
Question 202
Following this Kubernetes scenario, an operator validates remediation: A new control-plane node initializes but Pods will not receive Pod network addresses. Which measurable outcome shows success?
- The node becomes Ready and ordinary Pods receive reachable Pod IPs.
- Network add-on handles Pod routes while the runtime handles container lifecycle.
- The running component uses fresh certificates and healthy TLS connections are restored.
- The worker rejoins Ready with the approved kubelet version and scheduled workloads recover.
Explanation
Correct Answer
A:The node becomes Ready and ordinary Pods receive reachable Pod IPs. This outcome shows the required behavior after correction. The corresponding action is: Initialize kubeadm with a Pod CIDR compatible with the selected CNI and deploy that CNI.
Incorrect Answers
B:Network add-on handles Pod routes while the runtime handles container lifecycle. This is evidence for a separate case (A team mistakes the container network interface for the container runtime interface.), not for the target problem. An appropriate validation would be: The node becomes Ready and ordinary Pods receive reachable Pod IPs.
C:The running component uses fresh certificates and healthy TLS connections are restored. This is evidence for a separate case (After a certificate renewal, an old static Pod process still uses expired credentials.), not for the target problem. An appropriate validation would be: The node becomes Ready and ordinary Pods receive reachable Pod IPs.
D:The worker rejoins Ready with the approved kubelet version and scheduled workloads recover. This is evidence for a separate case (The control plane is upgraded but one worker still runs an older supported kubelet.), not for the target problem. An appropriate validation would be: The node becomes Ready and ordinary Pods receive reachable Pod IPs.
Question 203
During cluster maintenance, an engineer finds this problem: A Pod is Pending with a message about unbound immediate PersistentVolumeClaims. Which next action is technically justified?
- Create the expected key or correct the container's configMapKeyRef name.
- Find and correct backend readiness or selector mismatch before changing external routing.
- Diagnose valid kubelet client/server certificates and repair credential rotation through supported mechanisms.
- Resolve PVC provisioning or binding before expecting the scheduler to place the Pod.
Explanation
Correct Answer
D:Resolve PVC provisioning or binding before expecting the scheduler to place the Pod. This correction targets the specific failure. Persistent storage binding can be a prerequisite for Pod placement. A successful result is: The claim binds and the Pod becomes schedulable when topology constraints allow.
Incorrect Answers
A:This procedure belongs to a different Kubernetes condition (A Pod is stuck CreateContainerConfigError because a referenced ConfigMap key is absent.). Create the expected key or correct the container's configMapKeyRef name.
B:This procedure belongs to a different Kubernetes condition (A Service DNS resolves but connections fail and EndpointSlices contain zero ready endpoints.). Find and correct backend readiness or selector mismatch before changing external routing.
C:This procedure belongs to a different Kubernetes condition (Kubelet logs show TLS certificate errors after a node credential rotation.). Diagnose valid kubelet client/server certificates and repair credential rotation through supported mechanisms.
Question 204
A review finds this Kubernetes issue: kubectl suddenly reports connection refused after the team changed contexts. Which suggestion would make troubleshooting or security worse?
- Restart production etcd without checking the client endpoint.
- Apply scoped access rather than granting universal administration.
- Inspect the exact Secret or ConfigMap reference without exposing credentials.
- Preserve relevant logs when diagnosing a repeating container crash.
Explanation
Correct Answer
A:Restart production etcd without checking the client endpoint. Context misselection can masquerade as a cluster outage. A safer course is: Inspect current context and configured cluster server address, then choose the correct target.
Incorrect Answers
B:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Inspect current context and configured cluster server address, then choose the correct target.
C:Inspect the exact Secret or ConfigMap reference without exposing credentials. Configuration errors can be diagnosed without leaking sensitive data. For the stated case, a focused correction is: Inspect current context and configured cluster server address, then choose the correct target.
D:Preserve relevant logs when diagnosing a repeating container crash. Prior process output often identifies the immediate cause. For the stated case, a focused correction is: Inspect current context and configured cluster server address, then choose the correct target.
Question 205
An operations team tests its response to this finding: Database replicas require stable identities and persistent storage across rescheduling. Which outcome most clearly establishes that the fix worked?
- All desired replicas use image v2 and rollout status completes successfully.
- The Pod is excluded from Service endpoints until it becomes ready.
- A collector runs on each eligible node including newly joined nodes.
- Each replica retains stable ordinal identity and corresponding persistent claim.
Explanation
Correct Answer
D:Each replica retains stable ordinal identity and corresponding persistent claim. The corresponding action is: Use a StatefulSet with stable network identity and volumeClaimTemplates as appropriate.
Incorrect Answers
A:All desired replicas use image v2 and rollout status completes successfully. This is evidence for a separate case (A Deployment is using image v1 but needs a controlled update to image v2.), not for the target problem. An appropriate validation would be: Each replica retains stable ordinal identity and corresponding persistent claim.
B:The Pod is excluded from Service endpoints until it becomes ready. This is evidence for a separate case (A container is running but cannot serve requests until a cache is primed.), not for the target problem. An appropriate validation would be: Each replica retains stable ordinal identity and corresponding persistent claim.
C:A collector runs on each eligible node including newly joined nodes. This is evidence for a separate case (Each worker needs exactly one log-collector Pod when nodes are added.), not for the target problem. An appropriate validation would be: Each replica retains stable ordinal identity and corresponding persistent claim.
Question 206
An administrator reviews several possible responses to this condition: A Pod must resolve a private test hostname using a custom resolver without changing cluster-wide DNS. Which option creates an avoidable failure?
- Verify the target cluster and namespace before mutating resources.
- Edit CoreDNS globally for one temporary application requirement.
- Use a staged rollout and observe readiness before full deployment.
- Choose a storage access mode backed by real CSI capabilities.
Explanation
Correct Answer
B:Edit CoreDNS globally for one temporary application requirement. Per-Pod DNS policy and dnsConfig can override resolver behavior. A safer course is: Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately.
Incorrect Answers
A: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: Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately.
C:Use a staged rollout and observe readiness before full deployment. Staged changes reduce simultaneous loss of healthy replicas. For the stated case, a focused correction is: Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately.
D: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: Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately.
Question 207
During remediation, this failure appears: A kubeadm init uses an advertise address unreachable from joining nodes. Which action is the LEAST defensible?
- Use a loopback address for a remotely reachable cluster endpoint.
- Use a staged rollout and observe readiness before full deployment.
- Validate a change with a repeatable positive and negative test.
- Keep backups or change history for potentially destructive maintenance.
Explanation
Correct Answer
A:Use a loopback address for a remotely reachable cluster endpoint. Control-plane identity and advertised connectivity must match actual network routing. A safer course is: Align the node advertise address and stable control-plane endpoint with reachable network interfaces.
Incorrect Answers
B:Use a staged rollout and observe readiness before full deployment. Staged changes reduce simultaneous loss of healthy replicas. For the stated case, a focused correction is: Align the node advertise address and stable control-plane endpoint with reachable network interfaces.
C:Validate a change with a repeatable positive and negative test. A testable outcome provides stronger evidence than intent alone. For the stated case, a focused correction is: Align the node advertise address and stable control-plane endpoint with reachable network interfaces.
D:Keep backups or change history for potentially destructive maintenance. Recovery planning reduces the impact of a faulty change. For the stated case, a focused correction is: Align the node advertise address and stable control-plane endpoint with reachable network interfaces.
Question 208
A review finds this Kubernetes issue: Each worker needs exactly one log-collector Pod when nodes are added. Which suggestion would make troubleshooting or security worse?
- Run one Deployment replica and assume every worker receives an agent.
- Apply scoped access rather than granting universal administration.
- Test connectivity from the affected Pod before redesigning all Services.
- Validate a change with a repeatable positive and negative test.
Explanation
Correct Answer
A:Run one Deployment replica and assume every worker receives an agent. DaemonSets reconcile per-node agent placement rather than a fixed total replica count. A safer course is: Use a DaemonSet with node eligibility settings matching the intended workers.
Incorrect Answers
B:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Use a DaemonSet with node eligibility settings matching the intended workers.
C:Test connectivity from the affected Pod before redesigning all Services. Layered checks separate DNS, network and application failures. For the stated case, a focused correction is: Use a DaemonSet with node eligibility settings matching the intended workers.
D:Validate a change with a repeatable positive and negative test. A testable outcome provides stronger evidence than intent alone. For the stated case, a focused correction is: Use a DaemonSet with node eligibility settings matching the intended workers.
Question 209
An engineer needs to justify a change for this issue: The main app never starts because an initContainer image is inaccessible. Which technical reason is MOST relevant?
- InitContainer failures block ordinary container startup.
- Service existence does not guarantee a healthy backend endpoint.
- Autoscaling requires available metrics and valid target configuration.
- Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage.
Explanation
Correct Answer
A:InitContainer failures block ordinary container startup. This principle explains the targeted result. A concrete response is: Correct the initContainer image location or pull credentials.
Incorrect Answers
B:Service existence does not guarantee a healthy backend endpoint. This principle is useful for another case (A Service DNS resolves but connections fail and EndpointSlices contain zero ready endpoints.), but does not explain the most direct solution here. The governing consideration is: InitContainer failures block ordinary container startup.
C:Autoscaling requires available metrics and valid target configuration. This principle is useful for another case (HPA displays <unknown> target metrics while replicas never scale.), but does not explain the most direct solution here. The governing consideration is: InitContainer failures block ordinary container startup.
D: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. Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage.
Question 210
Following this Kubernetes scenario, an operator validates remediation: Each worker needs exactly one log-collector Pod when nodes are added. Which measurable outcome shows success?
- Replica distribution across eligible zones satisfies the configured skew where feasible.
- The Pod reads the Secret using its configured reference while unauthorized users cannot retrieve it.
- All desired replicas use image v2 and rollout status completes successfully.
- A collector runs on each eligible node including newly joined nodes.
Explanation
Correct Answer
D:A collector runs on each eligible node including newly joined nodes. This outcome shows the required behavior after correction. The corresponding action is: Use a DaemonSet with node eligibility settings matching the intended workers.
Incorrect Answers
A:Replica distribution across eligible zones satisfies the configured skew where feasible. This is evidence for a separate case (Replicas concentrate in one availability zone and violate resilience goals.), not for the target problem. An appropriate validation would be: A collector runs on each eligible node including newly joined nodes.
B:The Pod reads the Secret using its configured reference while unauthorized users cannot retrieve it. This is evidence for a separate case (An application password is mistakenly embedded in a ConfigMap and exposed to broad readers.), not for the target problem. An appropriate validation would be: A collector runs on each eligible node including newly joined nodes.
C:All desired replicas use image v2 and rollout status completes successfully. This is evidence for a separate case (A Deployment is using image v1 but needs a controlled update to image v2.), not for the target problem. An appropriate validation would be: A collector runs on each eligible node including newly joined nodes.