CNCF CKA Practice Test 65
Question 640
A cluster administrator must address the following case: An external HTTP service needs an infrastructure-managed public listener. Select TWO appropriate statements, one corrective action and one observable outcome.
- Remediation: Assume every bare-metal cluster automatically receives a public IP without a controller.
- Remediation: Create an ingress policy selecting the API Pods with combined namespaceSelector and podSelector peer criteria.
- Remediation: Use a LoadBalancer Service backed by a working provider integration.
- Validation: The Service obtains an external address and routes to ready backend Pods.
- Validation: In-cluster Service names resolve again from test Pods.
Explanation
Correct Answers
C:Remediation: Use a LoadBalancer Service backed by a working provider integration. The remedy targets the reported failure rather than a different subsystem. LoadBalancer services rely on an implementation or cloud integration to provision external access.
D:Validation: The Service obtains an external address and routes to ready backend Pods. This result verifies the behavior the remediation is supposed to restore.
Incorrect Answers
A:Remediation: Assume every bare-metal cluster automatically receives a public IP without a controller. This is the unsafe shortcut for the case, not an acceptable intervention. LoadBalancer services rely on an implementation or cloud integration to provision external access.
B:Remediation: Create an ingress policy selecting the API Pods with combined namespaceSelector and podSelector peer criteria. This action targets a different condition (An API must accept ingress only from Pods labeled role=client in namespace team-a.), not this reported failure: An external HTTP service needs an infrastructure-managed public listener.
E:Validation: In-cluster Service names resolve again from test Pods. This evidence applies to a different condition (All Pods lose service-name resolution after the CoreDNS Deployment becomes unavailable.), and would not verify this target fix: An external HTTP service needs an infrastructure-managed public listener.
Question 641
An engineer needs to justify a change for this issue: A kubectl command is applying objects in the wrong environment after a context switch. Which technical reason is MOST relevant?
- Cluster change diagnosis needs observed component evidence, not guesswork.
- Declarative bootstrap configuration reduces drift and makes cluster setup reproducible.
- Consensus systems require quorum; uncontrolled member recreation risks state loss.
- kubectl uses current-context, user and cluster mappings that must be validated.
Explanation
Correct Answer
D:Kubectl uses current-context, user and cluster mappings that must be validated. This principle explains the targeted result. A concrete response is: Inspect available kubeconfig contexts and explicitly select or specify the intended context.
Incorrect Answers
A:This principle is useful for another case (A new control-plane component does not appear ready after a manifest update.), but does not explain the most direct solution here. Kubectl uses current-context, user and cluster mappings that must be validated.
B:This principle is useful for another case (A cluster bootstrap script contains changing flags and has become difficult to audit.), but does not explain the most direct solution here. Kubectl uses current-context, user and cluster mappings that must be validated.
C:This principle is useful for another case (A stacked-etcd cluster has lost quorum after too many control-plane failures.), but does not explain the most direct solution here. Kubectl uses current-context, user and cluster mappings that must be validated.
Question 642
The team is reviewing this failure mode: A Deployment is using image v1 but needs a controlled update to image v2. Which statement explains WHY the recommended control works?
- Deployment controllers reconcile ReplicaSets to achieve a declared desired state.
- Liveness probes trigger container recovery when the application cannot progress.
- HPA acts on observed metrics to adjust workload replica counts.
- Taints repel Pods and tolerations allow consideration but do not force placement.
Explanation
Correct Answer
A:Deployment controllers reconcile ReplicaSets to achieve a declared desired state. This principle explains the targeted result. A concrete response is: Update the image on the Deployment and observe its rolling rollout.
Incorrect Answers
B:Liveness probes trigger container recovery when the application cannot progress. This principle is useful for another case (An HTTP server occasionally deadlocks while its process remains running.), but does not explain the most direct solution here. The governing consideration is: Deployment controllers reconcile ReplicaSets to achieve a declared desired state.
C:HPA acts on observed metrics to adjust workload replica counts. This principle is useful for another case (A CPU-bound deployment needs to grow replica count during sustained load.), but does not explain the most direct solution here. The governing consideration is: Deployment controllers reconcile ReplicaSets to achieve a declared desired state.
D:This principle is useful for another case (A special node has NoSchedule taint and a permitted Pod remains Pending.), but does not explain the most direct solution here. Deployment controllers reconcile ReplicaSets to achieve a declared desired state.
Question 643
Select TWO technically sound statements for this situation, covering remediation and validation: A Deployment's Pods report CreateContainerConfigError due to a missing Secret.
- Validation: Pods start with the authorized Secret and no sensitive value is printed in logs.
- Remediation: Allow required DNS egress to the cluster resolver while retaining intended isolation.
- Remediation: Create the intended Secret securely or correct secretKeyRef and namespace.
- Validation: HPA displays metrics and scales according to observed demand.
- Remediation: Paste the password into a publicly visible Deployment annotation.
Explanation
Correct Answers
A:Validation: Pods start with the authorized Secret and no sensitive value is printed in logs. This result verifies the behavior the remediation is supposed to restore.
C:Remediation: Create the intended Secret securely or correct secretKeyRef and namespace. The remedy targets the reported failure rather than a different subsystem. Kubernetes Secret references are namespaced and need valid names and keys.
Incorrect Answers
B:Remediation: Allow required DNS egress to the cluster resolver while retaining intended isolation. This action targets a different condition (Only Pods selected by a new egress policy fail DNS while other Pods resolve normally.), not this reported failure: A Deployment's Pods report CreateContainerConfigError due to a missing Secret.
D:Validation: HPA displays metrics and scales according to observed demand. This evidence applies to a different condition (HPA displays <unknown> target metrics while replicas never scale.), and would not verify this target fix: A Deployment's Pods report CreateContainerConfigError due to a missing Secret.
E:Remediation: Paste the password into a publicly visible Deployment annotation. This is the unsafe shortcut for the case, not an acceptable intervention. Kubernetes Secret references are namespaced and need valid names and keys.
Question 644
To avoid guessing about this fault, what should be inspected first? An API must accept ingress only from Pods labeled role=client in namespace team-a.
- Inspect kubectl get pods -n kube-system -l k8s-app=kube-dns and CoreDNS logs.
- Inspect kubectl get service service-name -o yaml and test nodeIP:nodePort connectivity.
- Inspect namespace labels and selected Pod labels, then test allowed and blocked connections.
- Run nslookup api.catalog.svc.cluster.local in a debugging Pod.
Explanation
Correct Answer
C:Inspect namespace labels and selected Pod labels, then test allowed and blocked connections. This diagnostic examines the relevant resource or subsystem. A single NetworkPolicy peer combining namespaceSelector and podSelector intersects their selection criteria. The validating result would be: Only the intended client Pods in team-a can reach the protected API.
Incorrect Answers
A:This check is appropriate to the separate problem (All Pods lose service-name resolution after the CoreDNS Deployment becomes unavailable.), but it is not the direct diagnostic for the described failure. Inspect namespace labels and selected Pod labels, then test allowed and blocked connections.
B:This check is appropriate to the separate problem (A development Service must be reachable on each eligible node at a defined node port.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (A Pod in payments namespace cannot resolve the short name api for a Service in catalog namespace.), but it is not the direct diagnostic for the described failure. Inspect namespace labels and selected Pod labels, then test allowed and blocked connections.
Question 645
During an operational review, this fact emerges: A Pod reports FailedMount because its referenced PVC exists in a different namespace. Which Kubernetes behavior MOST directly governs the result?
- Retain preserves data resources for explicit lifecycle handling after claim deletion.
- CSI attachment and mounting rely on healthy controller and node components.
- Access modes describe requested mounting capabilities but need backend support.
- PVC references from Pods are namespace-scoped.
Explanation
Correct Answer
D:PVC references from Pods are namespace-scoped. This principle explains the targeted result. A concrete response is: Create or reference a compatible PVC in the same namespace as the Pod.
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: PVC references from Pods are namespace-scoped.
B:This principle is useful for another case (A Pod is stuck ContainerCreating due to an attach timeout from a cloud block volume.), but does not explain the most direct solution here. CSI attachment and mounting rely on healthy controller and node components.
C:Access modes describe requested mounting capabilities but need backend support. This principle is useful for another case (A shared file workload requires concurrent writes from multiple nodes.), but does not explain the most direct solution here. The governing consideration is: PVC references from Pods are namespace-scoped.
Question 646
Select TWO technically sound statements for this situation, covering remediation and validation: A container is running but cannot serve requests until a cache is primed.
- Validation: The Pod is excluded from Service endpoints until it becomes ready.
- Remediation: Configure a readinessProbe that tests the actual application readiness endpoint.
- Remediation: Create a CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe.
- Validation: HPA displays utilization rather than unknown and computes a recommendation.
- Remediation: Use only a liveness probe and assume traffic cannot reach unready applications.
Explanation
Correct Answers
A:Validation: The Pod is excluded from Service endpoints until it becomes ready. This result verifies the behavior the remediation is supposed to restore.
B:Remediation: Configure a readinessProbe that tests the actual application readiness endpoint. The remedy targets the reported failure rather than a different subsystem. Readiness probes gate traffic eligibility, not whether the container process exists.
Incorrect Answers
C:Remediation: Create a CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe. This action targets a different condition (A cleanup should run nightly but prevent overlapping executions.), not this reported failure: A container is running but cannot serve requests until a cache is primed.
D:Validation: HPA displays utilization rather than unknown and computes a recommendation. This evidence applies to a different condition (HPA reports unknown CPU utilization although Pods are running.), and would not verify this target fix: A container is running but cannot serve requests until a cache is primed.
E:Remediation: Use only a liveness probe and assume traffic cannot reach unready applications. This is the unsafe shortcut for the case, not an acceptable intervention. Readiness probes gate traffic eligibility, not whether the container process exists.
Question 647
To avoid guessing about this fault, what should be inspected first? A Deployment must update without taking all replicas offline during rollout.
- Inspect kubectl get deploy web -o yaml and watch kubectl get replicasets,pods -w.
- Inspect Pod topologySpreadConstraints and node topology.kubernetes.io/zone labels.
- Inspect kubectl get pod -o yaml for secretKeyRef or secret volumes and test RBAC access.
- Inspect kubectl get pdb and allowedDisruptions before kubectl drain.
Explanation
Correct Answer
A:Inspect kubectl get deploy web -o yaml and watch kubectl get replicasets,pods -w. This diagnostic examines the relevant resource or subsystem. RollingUpdate availability and surge settings govern the rate of replica replacement. The validating result would be: The rollout maintains the intended number of available replicas at each transition.
Incorrect Answers
B:This check is appropriate to the separate problem (Replicas concentrate in one availability zone and violate resilience goals.), but it is not the direct diagnostic for the described failure. Inspect kubectl get deploy web -o yaml and watch kubectl get replicasets,pods -w.
C: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. Inspect kubectl get deploy web -o yaml and watch kubectl get replicasets,pods -w.
D:This check is appropriate to the separate problem (A maintenance drain would evict too many healthy replicas of a critical application.), but it is not the direct diagnostic for the described failure. Inspect kubectl get deploy web -o yaml and watch kubectl get replicasets,pods -w.
Question 648
During an operational review, this fact emerges: A node appears idle by CPU usage but a new Pod is unschedulable with Insufficient cpu. Which Kubernetes behavior MOST directly governs the result?
- NetworkPolicies are additive allow lists once isolation applies.
- Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage.
- Malformed DNS plugin configuration can disable cluster name resolution.
- Control-plane API responsiveness depends on healthy etcd persistence and quorum.
Explanation
Correct Answer
B:Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage. This principle explains the targeted result. A concrete response is: Compare resource requests against node allocatable rather than only live CPU utilization.
Incorrect Answers
A:This principle is useful for another case (After a default-deny NetworkPolicy, a required API-to-database connection times out.), but does not explain the most direct solution here. Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage.
C:This principle is useful for another case (Pods cannot resolve cluster Service names and CoreDNS Pods are CrashLoopBackOff.), but does not explain the most direct solution here.
D: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. Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage.
Question 649
A Kubernetes operator wants to verify this condition: The kube-scheduler static Pod disappeared after someone edited its manifest incorrectly. Which investigation step is BEST suited to the case?
- Inspect kubectl get nodes -o wide, kubelet package versions and kubeadm upgrade node instructions.
- Check /etc/kubernetes/manifests/kube-scheduler.yaml and journalctl -u kubelet.
- Compare kubelet and API server versions against the official version-skew policy.
- Compare kubectl get pods -o wide before and after kubectl cordon and kubectl drain.
Explanation
Correct Answer
B:Check /etc/kubernetes/manifests/kube-scheduler.yaml and journalctl -u kubelet. This diagnostic examines the relevant resource or subsystem. Kubelet automatically manages static Pods from its configured manifest path. The validating result would be: Kubelet recreates kube-scheduler and scheduler health recovers.
Incorrect Answers
A:This check is appropriate to the separate problem (The control plane is upgraded but one worker still runs an older supported kubelet.), but it is not the direct diagnostic for the described failure. Inspect kubectl get nodes -o wide, kubelet package versions and kubeadm upgrade node instructions.
C:Compare kubelet and API server versions against the official version-skew policy. This check is appropriate to the separate problem (A proposed upgrade would run kubelet newer than kube-apiserver.), but it is not the direct diagnostic for the described failure. The relevant check is: Check /etc/kubernetes/manifests/kube-scheduler.yaml and journalctl -u kubelet.
D:This check is appropriate to the separate problem (An administrator cordoned a node but existing Pods are still running on it.), but it is not the direct diagnostic for the described failure. Compare kubectl get pods -o wide before and after kubectl cordon and kubectl drain.
Question 650
A review finds this Kubernetes issue: An HTTPRoute is not serving traffic and its status reports ResolvedRefs False. Which suggestion would make troubleshooting or security worse?
- Keep backups or change history for potentially destructive maintenance.
- Record a rollback approach before high-impact control-plane changes.
- Test connectivity from the affected Pod before redesigning all Services.
- Restart unrelated worker kubelet services without inspecting Gateway conditions.
Explanation
Correct Answer
D:Restart unrelated worker kubelet services without inspecting Gateway conditions. Gateway API status conditions identify invalid reference wiring. A safer course is: Correct the invalid backend Service reference or required cross-namespace ReferenceGrant.
Incorrect Answers
A: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: Correct the invalid backend Service reference or required cross-namespace ReferenceGrant.
B:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Correct the invalid backend Service reference or required cross-namespace ReferenceGrant.
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: Correct the invalid backend Service reference or required cross-namespace ReferenceGrant.