CNCF CKA Practice Test 29
Question 280
During an operational review, this fact emerges: A Service virtual IP fails although direct Pod IP connectivity works. Which Kubernetes behavior MOST directly governs the result?
- Service VIP handling is distinct from basic Pod IP reachability.
- Egress policies must allow necessary dependency traffic such as DNS.
- Gateway API cross-namespace references require explicit grants for relevant reference types.
- Service affinity can be source-IP based but is not a durable application session store.
Explanation
Correct Answer
A:Service VIP handling is distinct from basic Pod IP reachability. This principle explains the targeted result. A concrete response is: Inspect Service routing implementation, kube-proxy or equivalent dataplane, and endpoint health.
Incorrect Answers
B:This principle is useful for another case (Egress-isolated Pods cannot resolve DNS even though their app traffic policy is correct.), but does not explain the most direct solution here. Service VIP handling is distinct from basic Pod IP reachability.
C:This principle is useful for another case (A Gateway API route in namespace web needs to refer to a backend Service in namespace shared.), but does not explain the most direct solution here. Service VIP handling is distinct from basic Pod IP reachability.
D:This principle is useful for another case (A legacy client needs repeated requests to tend to the same Pod behind one Service.), but does not explain the most direct solution here. Service VIP handling is distinct from basic Pod IP reachability.
Question 281
To avoid guessing about this fault, what should be inspected first? A Pod is Pending with an untolerated NoSchedule taint despite free CPU.
- Inspect kubectl get httproute -o yaml status.parents conditions and backend refs.
- Run curl -H 'Host: app.example.test' through ingress and inspect describe ingress.
- Inspect kubectl describe pod FailedScheduling and node taints.
- Use kubectl describe node and journalctl -u kubelet with API connectivity tests.
Explanation
Correct Answer
C:Inspect kubectl describe pod FailedScheduling and node taints. This diagnostic examines the relevant resource or subsystem. Taints and tolerations affect eligibility separately from CPU capacity. The validating result would be: The Pod schedules while node isolation remains deliberate.
Incorrect Answers
A:This check is appropriate to the separate problem (An HTTPRoute is not serving traffic and its status reports ResolvedRefs False.), but it is not the direct diagnostic for the described failure. Inspect kubectl get httproute -o yaml status.parents conditions and backend refs.
B:This check is appropriate to the separate problem (Ingress answers HTTPS but returns 404 for /api while backend Service works locally.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (A worker unexpectedly becomes NotReady following a network maintenance event.), but it is not the direct diagnostic for the described failure. Use kubectl describe node and journalctl -u kubelet with API connectivity tests.
Question 282
A cluster team is handling this situation: An operator wants temporary access to an internal Pod without publishing a public Service. Which proposed shortcut should be REJECTED?
- Record a rollback approach before high-impact control-plane changes.
- Test connectivity from the affected Pod before redesigning all Services.
- Validate a change with a repeatable positive and negative test.
- Change the Service to LoadBalancer solely to inspect a health endpoint once.
Explanation
Correct Answer
D:Change the Service to LoadBalancer solely to inspect a health endpoint once. Port forwarding is a debugging tunnel, not an internet-facing production endpoint. A safer course is: Use kubectl port-forward to an appropriate Pod or Service for authorized short-lived access.
Incorrect Answers
A:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Use kubectl port-forward to an appropriate Pod or Service for authorized short-lived access.
B: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 kubectl port-forward to an appropriate Pod or Service for authorized short-lived access.
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: Use kubectl port-forward to an appropriate Pod or Service for authorized short-lived access.
Question 283
During an operational review, this fact emerges: An operator must update one named ConfigMap but must not edit every ConfigMap. Which Kubernetes behavior MOST directly governs the result?
- RBAC resourceNames can narrow certain resource requests to named objects.
- A highly available control plane needs a stable reachable API endpoint.
- kubeadm bootstraps control-plane components; a compatible CNI provides Pod networking.
- RBAC permissions are granted through role bindings and scoped to intended subjects and namespaces.
Explanation
Correct Answer
A:RBAC resourceNames can narrow certain resource requests to named objects. This principle explains the targeted result. A concrete response is: Use a Role limited to the required verbs and resourceNames for the named ConfigMap.
Incorrect Answers
B:This principle is useful for another case (Two API servers run but workloads use one control-plane node IP as the endpoint.), but does not explain the most direct solution here. RBAC resourceNames can narrow certain resource requests to named objects.
C: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. RBAC resourceNames can narrow certain resource requests to named objects.
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. RBAC resourceNames can narrow certain resource requests to named objects.
Question 284
During cluster maintenance, an engineer finds this problem: A Java application needs two minutes to initialize but liveness checks restart it at 30 seconds. Which next action is technically justified?
- Add a startupProbe with a startup budget before liveness checking begins.
- Configure a readinessProbe that tests the actual application readiness endpoint.
- Create a CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe.
- Configure topologySpreadConstraints with topologyKey and appropriate maxSkew behavior.
Explanation
Correct Answer
A:Add a startupProbe with a startup budget before liveness checking begins. This correction targets the specific failure. Startup probes delay other probes until initialization succeeds. A successful result is: The container survives normal slow initialization then receives ongoing liveness checks.
Incorrect Answers
B:Configure a readinessProbe that tests the actual application readiness endpoint. This procedure belongs to a different Kubernetes condition (A container is running but cannot serve requests until a cache is primed.). It does not directly resolve the observed failure. The targeted action is: Add a startupProbe with a startup budget before liveness checking begins.
C:Create a CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe.
D:Configure topologySpreadConstraints with topologyKey and appropriate maxSkew behavior. This procedure belongs to a different Kubernetes condition (Replicas concentrate in one availability zone and violate resilience goals.). It does not directly resolve the observed failure. The targeted action is: Add a startupProbe with a startup budget before liveness checking begins.
Question 285
A CKA learner must investigate the following: Node role labels are inconsistent after provisioning new workers. Which command or check supplies the MOST direct diagnostic evidence?
- Check load-balancer health and kubeconfig server addresses against the shared endpoint.
- Inspect kubectl get nodes --show-labels and spot-check real node configuration.
- Test with kubectl auth can-i get configmaps -n team-a --as=system:serviceaccount:team-a:controller.
- Inspect crictl info and kubelet --container-runtime-endpoint configuration.
Explanation
Correct Answer
B:Inspect kubectl get nodes --show-labels and spot-check real node configuration. This diagnostic examines the relevant resource or subsystem. Labels are selectors and must reflect real intended node attributes. The validating result would be: The intended nodes have the expected labels and targeted scheduling rules match them.
Incorrect Answers
A:This check is appropriate to the separate problem (Two API servers run but workloads use one control-plane node IP as the endpoint.), but it is not the direct diagnostic for the described failure. Inspect kubectl get nodes --show-labels and spot-check real node configuration.
C:This check is appropriate to the separate problem (A controller ServiceAccount needs to read ConfigMaps only in team-a.), but it is not the direct diagnostic for the described failure. Inspect kubectl get nodes --show-labels and spot-check real node configuration.
D:This check is appropriate to the separate problem (A node image update changes the runtime socket and kubelet can no longer create containers.), but it is not the direct diagnostic for the described failure. Inspect kubectl get nodes --show-labels and spot-check real node configuration.
Question 286
An engineer reports that this problem was fixed: Two clusters need the same base manifest but different replica counts and labels. What specific result should an independent reviewer expect?
- Resources return to known-good configuration with preserved change history.
- An impersonated create deployment request is denied in the target namespace.
- The controller can get its intended ConfigMaps but cannot modify Secrets or read other namespaces.
- Rendered manifests share the base while environment-specific patches differ as intended.
Explanation
Correct Answer
D:Rendered manifests share the base while environment-specific patches differ as intended. This outcome shows the required behavior after correction. The corresponding action is: Use Kustomize bases and overlays rather than maintaining divergent full copies.
Incorrect Answers
A:Resources return to known-good configuration with preserved change history. This is evidence for a separate case (A Helm upgrade caused a regression in a cluster add-on.), not for the target problem. An appropriate validation would be: Rendered manifests share the base while environment-specific patches differ as intended.
B:An impersonated create deployment request is denied in the target namespace. This is evidence for a separate case (An admin changed RoleBindings and wants proof the operator cannot create deployments.), not for the target problem. An appropriate validation would be: Rendered manifests share the base while environment-specific patches differ as intended.
C:The controller can get its intended ConfigMaps but cannot modify Secrets or read other namespaces. This is evidence for a separate case (A controller ServiceAccount needs to read ConfigMaps only in team-a.), not for the target problem. An appropriate validation would be: Rendered manifests share the base while environment-specific patches differ as intended.
Question 287
A Kubernetes operator wants to verify this condition: A kubeadm init uses an advertise address unreachable from joining nodes. Which investigation step is BEST suited to the case?
- Inspect kube-apiserver advertise-address and test TCP connectivity to the intended endpoint.
- Run ETCDCTL_API=3 etcdctl snapshot save with endpoint, cacert, cert and key parameters.
- Inspect kubectl get nodes --show-labels and spot-check real node configuration.
- Run kubeadm config validate against the intended version and inspect kubeadm config print init-defaults.
Explanation
Correct Answer
A:Inspect kube-apiserver advertise-address and test TCP connectivity to the intended endpoint. This diagnostic examines the relevant resource or subsystem. Control-plane identity and advertised connectivity must match actual network routing. The validating result would be: Workers reach the API server and successfully complete the trusted join workflow.
Incorrect Answers
B:This check is appropriate to the separate problem (A stacked-etcd control plane needs a recoverable snapshot before upgrade.), but it is not the direct diagnostic for the described failure.
C:This check is appropriate to the separate problem (Node role labels are inconsistent after provisioning new workers.), but it is not the direct diagnostic for the described failure. Inspect kube-apiserver advertise-address and test TCP connectivity to the intended endpoint.
D:This check is appropriate to the separate problem (A cluster bootstrap script contains changing flags and has become difficult to audit.), but it is not the direct diagnostic for the described failure. Inspect kube-apiserver advertise-address and test TCP connectivity to the intended endpoint.
Question 288
An engineer reports that this problem was fixed: Pods on one worker fail while the node reports DiskPressure. What specific result should an independent reviewer expect?
- The Service has ready endpoints and traffic reaches them.
- The HTTPRoute reference resolves and accepted traffic reaches intended backends.
- The node clears DiskPressure and Pods can start with sufficient ephemeral storage.
- Kubelet authenticates to the API and node status updates normally.
Explanation
Correct Answer
C:The node clears DiskPressure and Pods can start with sufficient ephemeral storage. The corresponding action is: Inspect image, container log and ephemeral-storage usage and reclaim space safely.
Incorrect Answers
A:The Service has ready endpoints and traffic reaches them. This is evidence for a separate case (A Service DNS resolves but connections fail and EndpointSlices contain zero ready endpoints.), not for the target problem. An appropriate validation would be: The node clears DiskPressure and Pods can start with sufficient ephemeral storage.
B:The HTTPRoute reference resolves and accepted traffic reaches intended backends. This is evidence for a separate case (An HTTPRoute is not serving traffic and its status reports ResolvedRefs False.), not for the target problem. An appropriate validation would be: The node clears DiskPressure and Pods can start with sufficient ephemeral storage.
D:Kubelet authenticates to the API and node status updates normally. This is evidence for a separate case (Kubelet logs show TLS certificate errors after a node credential rotation.), not for the target problem. An appropriate validation would be: The node clears DiskPressure and Pods can start with sufficient ephemeral storage.
Question 289
The team is reviewing this failure mode: A database requires exclusive access by exactly one Pod to a PVC. Which statement explains WHY the recommended control works?
- Retain preserves data resources for explicit lifecycle handling after claim deletion.
- ReadWriteOncePod is more restrictive than node-level ReadWriteOnce.
- PVC references from Pods are namespace-scoped.
- Default StorageClasses influence requests that do not explicitly select a class.
Explanation
Correct Answer
B:ReadWriteOncePod is more restrictive than node-level ReadWriteOnce. This principle explains the targeted result. A concrete response is: Use ReadWriteOncePod with a compatible CSI environment when strict single-Pod ownership is required.
Incorrect Answers
A:Retain preserves data resources for explicit lifecycle handling after claim deletion. This principle is useful for another case (A StatefulSet is decommissioned but its underlying audit volume must remain for investigation.), but does not explain the most direct solution here. The governing consideration is: ReadWriteOncePod is more restrictive than node-level ReadWriteOnce.
C:PVC references from Pods are namespace-scoped. This principle is useful for another case (A Pod reports FailedMount because its referenced PVC exists in a different namespace.), but does not explain the most direct solution here. The governing consideration is: ReadWriteOncePod is more restrictive than node-level ReadWriteOnce.
D:Default StorageClasses influence requests that do not explicitly select a class. This principle is useful for another case (New claims omit storageClassName and use an unintended slow storage provider.), but does not explain the most direct solution here. The governing consideration is: ReadWriteOncePod is more restrictive than node-level ReadWriteOnce.
Question 290
An operations team tests its response to this finding: A legacy client needs repeated requests to tend to the same Pod behind one Service. Which outcome most clearly establishes that the fix worked?
- Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
- Ready endpoints include all healthy replicas and service requests balance accordingly.
- DNS resolves the desired Service from other namespaces.
- Disallowed outbound connections fail while approved egress stays functional.
Explanation
Correct Answer
A:Repeated traffic from one source IP is directed consistently while healthy endpoints exist. The corresponding action is: Configure Service sessionAffinity ClientIP when its limitations are acceptable.
Incorrect Answers
B:Ready endpoints include all healthy replicas and service requests balance accordingly. This is evidence for a separate case (Traffic reaches only one replica because two backend Pods have failing readiness.), not for the target problem. An appropriate validation would be: Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
C:DNS resolves the desired Service from other namespaces. This is evidence for a separate case (A Pod in payments namespace cannot resolve the short name api for a Service in catalog namespace.), not for the target problem. An appropriate validation would be: Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
D:Disallowed outbound connections fail while approved egress stays functional. This is evidence for a separate case (A team thinks applying an ingress-only policy prevents Pods from sending outbound traffic.), not for the target problem. An appropriate validation would be: Repeated traffic from one source IP is directed consistently while healthy endpoints exist.