CNCF CKA Practice Test 20
Question 190
The team is reviewing this failure mode: A newly deployed Service selector uses app=front while Pods are labeled app=frontend. Which statement explains WHY the recommended control works?
- Ingress controller routing matches requested host/path against explicit rules.
- Service selectors must match label key/value pairs exactly.
- Pod address exhaustion can block container networking despite healthy kubelet.
- Kubelet is the local node agent and its failure affects Pod management and reporting.
Explanation
Correct Answer
B:Service selectors must match label key/value pairs exactly. This principle explains the targeted result. A concrete response is: Correct the Service selector to match actual intended backend labels.
Incorrect Answers
A:Ingress controller routing matches requested host/path against explicit rules. This principle is useful for another case (Ingress answers HTTPS but returns 404 for /api while backend Service works locally.), but does not explain the most direct solution here. The governing consideration is: Service selectors must match label key/value pairs exactly.
C:This principle is useful for another case (A CNI plugin fails to allocate Pod addresses as a node's Pod CIDR fills.), but does not explain the most direct solution here. Service selectors must match label key/value pairs exactly.
D:This principle is useful for another case (All Pods on one node disappear from monitoring after kubelet service stops.), but does not explain the most direct solution here. Service selectors must match label key/value pairs exactly.
Question 191
A CKA learner must investigate the following: kubectl reports x509 certificate expired after months of successful access. Which command or check supplies the MOST direct diagnostic evidence?
- Inspect kubectl get lease -n kube-system and scheduler leader-election logs.
- Compare ClusterIP and direct Pod tests from affected and healthy nodes.
- Inspect kubectl config view --minify and certificate notAfter dates.
- Test nslookup and inspect egress policy ports 53 UDP/TCP for selected Pods.
Explanation
Correct Answer
C:Inspect kubectl config view --minify and certificate notAfter dates. This diagnostic examines the relevant resource or subsystem. Expired credentials can interrupt API clients while the server remains healthy. The validating result would be: kubectl authenticates using current trust without insecure TLS bypass.
Incorrect Answers
A:This check is appropriate to the separate problem (Multiple scheduler Pods run but none can acquire the leader lease.), but it is not the direct diagnostic for the described failure. Inspect kubectl config view --minify and certificate notAfter dates.
B: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 kubectl config view --minify and certificate notAfter dates.
D:This check is appropriate to the separate problem (Only Pods selected by a new egress policy fail DNS while other Pods resolve normally.), but it is not the direct diagnostic for the described failure. Inspect kubectl config view --minify and certificate notAfter dates.
Question 192
An operations team tests its response to this finding: A Pod reports FailedMount because its referenced PVC exists in a different namespace. Which outcome most clearly establishes that the fix worked?
- Pods on different nodes mount the RWX volume successfully.
- The Pod's volume mounts successfully with its namespace-local claim.
- A new PV is dynamically created and the claim becomes Bound.
- The PVC becomes Bound to a compatible volume and its Pod can mount it.
Explanation
Correct Answer
B:The Pod's volume mounts successfully with its namespace-local claim. This outcome shows the required behavior after correction. The corresponding action is: Create or reference a compatible PVC in the same namespace as the Pod.
Incorrect Answers
A:Pods on different nodes mount the RWX volume successfully. This is evidence for a separate case (A shared file workload requires concurrent writes from multiple nodes.), not for the target problem. An appropriate validation would be: The Pod's volume mounts successfully with its namespace-local claim.
C:A new PV is dynamically created and the claim becomes Bound. This is evidence for a separate case (A PVC requests storageClassName fast but no PV is created after several minutes.), not for the target problem. An appropriate validation would be: The Pod's volume mounts successfully with its namespace-local claim.
D:The PVC becomes Bound to a compatible volume and its Pod can mount it. This is evidence for a separate case (A PVC stays Pending because it asks for 20Gi while the only matching PV has 10Gi.), not for the target problem. An appropriate validation would be: The Pod's volume mounts successfully with its namespace-local claim.
Question 193
A platform engineer receives this incident: A Pod reports FailedMount because its referenced PVC exists in a different namespace. Which change should be made first after validating the facts?
- Use persistent storage backed by a PVC for data that must survive Pod deletion.
- Use a compatible StorageClass with volumeBindingMode WaitForFirstConsumer.
- Create or reference a compatible PVC in the same namespace as the Pod.
- Set reclaimPolicy Retain and manage retained PV and backend data under approved procedure.
Explanation
Correct Answer
C:Create or reference a compatible PVC in the same namespace as the Pod. This correction targets the specific failure. PVC references from Pods are namespace-scoped. A successful result is: The Pod's volume mounts successfully with its namespace-local claim.
Incorrect Answers
A:This procedure belongs to a different Kubernetes condition (A team stores a critical database file in an emptyDir volume and loses it after Pod replacement.). Use persistent storage backed by a PVC for data that must survive Pod deletion.
B:Use a compatible StorageClass with volumeBindingMode WaitForFirstConsumer. This procedure belongs to a different Kubernetes condition (A topology-bound cloud disk is provisioned in the wrong zone before its Pod schedules.). It does not directly resolve the observed failure. The targeted action is: Create or reference a compatible PVC in the same namespace as the Pod.
D:This procedure belongs to a different Kubernetes condition (A StatefulSet is decommissioned but its underlying audit volume must remain for investigation.).
Question 194
Following this Kubernetes scenario, an operator validates remediation: An API client certificate is about to expire on a kubeadm managed control plane. Which measurable outcome shows success?
- TLS clients can authenticate after renewal and the control plane is healthy.
- Nodes transition to Ready and cross-node Pod connectivity becomes available.
- The intended nodes have the expected labels and targeted scheduling rules match them.
- etcd regains a healthy majority and API writes succeed without divergent state.
Explanation
Correct Answer
A:TLS clients can authenticate after renewal and the control plane is healthy. The corresponding action is: Inspect certificate expirations and plan safe renewal with component restart and verification as necessary.
Incorrect Answers
B:Nodes transition to Ready and cross-node Pod connectivity becomes available. This is evidence for a separate case (Newly initialized cluster has a healthy API server but all workers remain NotReady with network plugin not initialized.), not for the target problem. An appropriate validation would be: TLS clients can authenticate after renewal and the control plane is healthy.
C:The intended nodes have the expected labels and targeted scheduling rules match them. This is evidence for a separate case (Node role labels are inconsistent after provisioning new workers.), not for the target problem. An appropriate validation would be: TLS clients can authenticate after renewal and the control plane is healthy.
D:Etcd regains a healthy majority and API writes succeed without divergent state. This is evidence for a separate case (A stacked-etcd cluster has lost quorum after too many control-plane failures.), not for the target problem. An appropriate validation would be: TLS clients can authenticate after renewal and the control plane is healthy.
Question 195
An engineer reports that this problem was fixed: A newly deployed app repeatedly exits with invalid configuration errors. What specific result should an independent reviewer expect?
- Container starts and readiness recovers without repeated exits.
- The Pod schedules on an appropriate node that satisfies required affinity.
- The container receives required config and starts without reference errors.
- The identified workload and node saturation explain latency and a targeted capacity change restores headroom.
Explanation
Correct Answer
A:Container starts and readiness recovers without repeated exits. The corresponding action is: Review current and previous container logs and correct the referenced configuration.
Incorrect Answers
B:The Pod schedules on an appropriate node that satisfies required affinity. This is evidence for a separate case (A Pod requests a non-existent node label through required node affinity.), not for the target problem. An appropriate validation would be: Container starts and readiness recovers without repeated exits.
C:The container receives required config and starts without reference errors. This is evidence for a separate case (A Pod is stuck CreateContainerConfigError because a referenced ConfigMap key is absent.), not for the target problem. An appropriate validation would be: Container starts and readiness recovers without repeated exits.
D:The identified workload and node saturation explain latency and a targeted capacity change restores headroom. This is evidence for a separate case (A node reports high CPU use and latency spikes while the scheduler keeps assigning Pods.), not for the target problem. An appropriate validation would be: Container starts and readiness recovers without repeated exits.
Question 196
Consider the following Kubernetes administration case: A Deployment consumes a ConfigMap through env vars and existing Pods still have old values. Which principle BEST explains the intended solution?
- Readiness probes gate traffic eligibility, not whether the container process exists.
- PDBs govern voluntary disruptions and require enough workload capacity to permit safe evictions.
- Node selection constrains placement to labeled eligible machines.
- Container environment variables are set at start and do not update in place.
Explanation
Correct Answer
D:Container environment variables are set at start and do not update in place. This principle explains the targeted result. A concrete response is: Update the ConfigMap and roll out fresh Pods when environment variables need refresh.
Incorrect Answers
A:This principle is useful for another case (A container is running but cannot serve requests until a cache is primed.), but does not explain the most direct solution here. Container environment variables are set at start and do not update in place.
B:This principle is useful for another case (A maintenance drain would evict too many healthy replicas of a critical application.), but does not explain the most direct solution here. Container environment variables are set at start and do not update in place.
C:This principle is useful for another case (A GPU workload was scheduled on a node without GPU hardware.), but does not explain the most direct solution here.
Question 197
For this Kubernetes issue, select TWO statements that correctly pair a response with the evidence it should produce: The API server is slow and logs show etcd request timeouts.
- Remediation: Inspect etcd endpoint health, disk latency, quorum and certificate connectivity.
- Remediation: Delete all etcd snapshots as a latency optimization.
- Remediation: Read the prior container instance logs using the --previous option.
- Validation: Container starts and readiness recovers without repeated exits.
- Validation: etcd health is restored and API read/write latency returns to acceptable levels.
Explanation
Correct Answers
A:Remediation: Inspect etcd endpoint health, disk latency, quorum and certificate connectivity. The remedy targets the reported failure rather than a different subsystem. Control-plane API responsiveness depends on healthy etcd persistence and quorum.
E:Validation: etcd health is restored and API read/write latency returns to acceptable levels. This result verifies the behavior the remediation is supposed to restore.
Incorrect Answers
B:Remediation: Delete all etcd snapshots as a latency optimization. This is the unsafe shortcut for the case, not an acceptable intervention. Control-plane API responsiveness depends on healthy etcd persistence and quorum.
C:Remediation: Read the prior container instance logs using the --previous option. This action targets a different condition (An app container restarts so quickly that current kubectl logs show only its latest attempt.), not this reported failure: The API server is slow and logs show etcd request timeouts.
D:Validation: Container starts and readiness recovers without repeated exits. This evidence applies to a different condition (A newly deployed app repeatedly exits with invalid configuration errors.), and would not verify this target fix: The API server is slow and logs show etcd request timeouts.
Question 198
For this Kubernetes issue, select TWO statements that correctly pair a response with the evidence it should produce: A Pod in test is unintentionally accessing the API with its default ServiceAccount.
- Remediation: Repair the scheduler static Pod YAML in the kubelet watched manifest directory.
- Remediation: Assign a dedicated ServiceAccount and disable token automount if API access is unnecessary.
- Validation: The etcd member starts from restored data and expected Kubernetes API resources reappear.
- Remediation: Store a permanent cluster-admin token inside the image.
- Validation: The running Pod lacks an automatically mounted API token when no Kubernetes API access is needed.
Explanation
Correct Answers
B:Remediation: Assign a dedicated ServiceAccount and disable token automount if API access is unnecessary. The remedy targets the reported failure rather than a different subsystem. ServiceAccount token exposure should match a workload's API access requirements.
E:Validation: The running Pod lacks an automatically mounted API token when no Kubernetes API access is needed. This result verifies the behavior the remediation is supposed to restore.
Incorrect Answers
A:Remediation: Repair the scheduler static Pod YAML in the kubelet watched manifest directory. This action targets a different condition (The kube-scheduler static Pod disappeared after someone edited its manifest incorrectly.), not this reported failure: A Pod in test is unintentionally accessing the API with its default ServiceAccount.
C:Validation: The etcd member starts from restored data and expected Kubernetes API resources reappear. This evidence applies to a different condition (An etcd snapshot is valid but the restored control plane is reading an empty data directory.), and would not verify this target fix: A Pod in test is unintentionally accessing the API with its default ServiceAccount.
D:Remediation: Store a permanent cluster-admin token inside the image. This is the unsafe shortcut for the case, not an acceptable intervention. ServiceAccount token exposure should match a workload's API access requirements.
Question 199
An engineer reports that this problem was fixed: A batch import must succeed once and then stop rather than keep restarting forever. What specific result should an independent reviewer expect?
- The Job reaches Complete after desired successful executions.
- The application reads the intended namespace configuration and the Pod references the ConfigMap.
- Healthy replicas return to the previous image and readiness is restored.
- The Pod lands only on nodes with the confirmed GPU label and hardware.
Explanation
Correct Answer
A:The Job reaches Complete after desired successful executions. This outcome shows the required behavior after correction. The corresponding action is: Use a Job with restart and backoff settings appropriate for finite completion.
Incorrect Answers
B:The application reads the intended namespace configuration and the Pod references the ConfigMap. This is evidence for a separate case (A workload requires a nonsecret configuration file that varies per namespace.), not for the target problem. An appropriate validation would be: The Job reaches Complete after desired successful executions.
C:Healthy replicas return to the previous image and readiness is restored. This is evidence for a separate case (A recent Deployment image change causes requests to fail and the previous revision worked.), not for the target problem. An appropriate validation would be: The Job reaches Complete after desired successful executions.
D:The Pod lands only on nodes with the confirmed GPU label and hardware. This is evidence for a separate case (A GPU workload was scheduled on a node without GPU hardware.), not for the target problem. An appropriate validation would be: The Job reaches Complete after desired successful executions.
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.