CNCF CKA Practice Test 63
Question 620
A Kubernetes operations team observes the following: New Pods remain Pending even with free node resources and kube-scheduler is unhealthy. What is the MOST appropriate corrective action?
- Test name resolution, then TCP reachability, policies and listening port stepwise.
- Find and correct backend readiness or selector mismatch before changing external routing.
- Inspect scheduler static Pod health, logs and leader election before targeted repair.
- Apply an approved toleration or choose an eligible untainted node.
Explanation
Correct Answer
C:Inspect scheduler static Pod health, logs and leader election before targeted repair. This correction targets the specific failure. Pending Pod placement depends on a functioning scheduler as well as available resources. A successful result is: Scheduling resumes and eligible Pods receive node assignments.
Incorrect Answers
A:Test name resolution, then TCP reachability, policies and listening port stepwise. This procedure belongs to a different Kubernetes condition (An app cannot reach a database and the error is a TCP timeout, not DNS NXDOMAIN.). It does not directly resolve the observed failure. The targeted action is: Inspect scheduler static Pod health, logs and leader election before targeted repair.
B:Find and correct backend readiness or selector mismatch before changing external routing.
D:Apply an approved toleration or choose an eligible untainted node. This procedure belongs to a different Kubernetes condition (A Pod is Pending with an untolerated NoSchedule taint despite free CPU.). It does not directly resolve the observed failure. The targeted action is: Inspect scheduler static Pod health, logs and leader election before targeted repair.
Question 621
An administrator reviews several possible responses to this condition: After a default-deny NetworkPolicy, a required API-to-database connection times out. Which option creates an avoidable failure?
- Use a staged rollout and observe readiness before full deployment.
- Choose a storage access mode backed by real CSI capabilities.
- Turn off the network plugin to bypass the policy.
- Review controller logs and resource status to understand reconciliation failures.
Explanation
Correct Answer
C:Turn off the network plugin to bypass the policy. NetworkPolicies are additive allow lists once isolation applies. A safer course is: Add a specific policy allowing the expected source and destination labels and port.
Incorrect Answers
A: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: Add a specific policy allowing the expected source and destination labels and port.
B: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: Add a specific policy allowing the expected source and destination labels and port.
D:Review controller logs and resource status to understand reconciliation failures. Controller evidence can distinguish desired state from observed failure. For the stated case, a focused correction is: Add a specific policy allowing the expected source and destination labels and port.
Question 622
A Kubernetes operations team observes the following: A Service listens on port 80 but the container listens on 8080 and requests fail. What is the MOST appropriate corrective action?
- Use a ClusterIP Service selecting the backend Pods.
- Configure a NodePort Service with the appropriate servicePort, targetPort and allowed nodePort.
- Set Service targetPort to the actual container listening port while retaining desired Service port.
- Inspect CoreDNS forward configuration, upstream resolver reachability and network policies.
Explanation
Correct Answer
C:Set Service targetPort to the actual container listening port while retaining desired Service port. This correction targets the specific failure. Service port and targetPort express different ends of routing. A successful result is: Requests to Service port 80 reach the application listener on 8080.
Incorrect Answers
A:Use a ClusterIP Service selecting the backend Pods. This procedure belongs to a different Kubernetes condition (An internal backend should only be reachable from inside the cluster through one stable address.). It does not directly resolve the observed failure. The targeted action is: Set Service targetPort to the actual container listening port while retaining desired Service port.
B:Configure a NodePort Service with the appropriate servicePort, targetPort and allowed nodePort. This procedure belongs to a different Kubernetes condition (A development Service must be reachable on each eligible node at a defined node port.). It does not directly resolve the observed failure. The targeted action is: Set Service targetPort to the actual container listening port while retaining desired Service port.
D:Inspect CoreDNS forward configuration, upstream resolver reachability and network policies. This procedure belongs to a different Kubernetes condition (Internal Service names resolve but Pods cannot resolve public domains through CoreDNS.). It does not directly resolve the observed failure. The targeted action is: Set Service targetPort to the actual container listening port while retaining desired Service port.
Question 623
The team is reviewing this failure mode: kubectl top nodes fails with Metrics API not available. Which statement explains WHY the recommended control works?
- Node memory pressure can trigger evictions according to resource availability and Pod QoS.
- Resource metrics API availability depends on healthy metrics-server integration.
- Malformed DNS plugin configuration can disable cluster name resolution.
- Autoscaling requires available metrics and valid target configuration.
Explanation
Correct Answer
B:Resource metrics API availability depends on healthy metrics-server integration. This principle explains the targeted result. A concrete response is: Recover the supported metrics-server installation and its APIService registration.
Incorrect Answers
A:This principle is useful for another case (A worker transitions to MemoryPressure and several application Pods are evicted.), but does not explain the most direct solution here.
C:Malformed DNS plugin configuration can disable cluster name resolution. 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. The governing consideration is: Resource metrics API availability depends on healthy metrics-server integration.
D: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: Resource metrics API availability depends on healthy metrics-server integration.
Question 624
An administrator reviews several possible responses to this condition: HPA displays <unknown> target metrics while replicas never scale. Which option creates an avoidable failure?
- Apply scoped access rather than granting universal administration.
- Preserve relevant logs when diagnosing a repeating container crash.
- Edit HPA maxReplicas randomly without fixing metrics.
- Validate a change with a repeatable positive and negative test.
Explanation
Correct Answer
C:Edit HPA maxReplicas randomly without fixing metrics. Autoscaling requires available metrics and valid target configuration. A safer course is: Diagnose metrics-server, metrics API availability and resource requests.
Incorrect Answers
A:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Diagnose metrics-server, metrics API availability and resource requests.
B: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: Diagnose metrics-server, metrics API availability and resource requests.
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: Diagnose metrics-server, metrics API availability and resource requests.
Question 625
A CKA learner must investigate the following: An application fails because its database initialization must happen before the main process. Which command or check supplies the MOST direct diagnostic evidence?
- Run kubectl top pods and inspect HPA conditions and Pod CPU requests.
- Inspect Pod initContainerStatuses and events for initialization sequencing.
- Inspect kubectl get configmap settings -o yaml and kubectl exec to verify mounted data.
- Inspect kubectl get pdb and allowedDisruptions before kubectl drain.
Explanation
Correct Answer
B:Inspect Pod initContainerStatuses and events for initialization sequencing. This diagnostic examines the relevant resource or subsystem. Init containers sequence prerequisite work before ordinary containers. The validating result would be: Main application containers start only after initContainers complete successfully.
Incorrect Answers
A:This check is appropriate to the separate problem (HPA reports unknown CPU utilization although Pods are running.), 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 workload requires a nonsecret configuration file that varies per namespace.), but it is not the direct diagnostic for the described failure. Inspect kubectl get configmap settings -o yaml and kubectl exec to verify mounted data.
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 pdb and allowedDisruptions before kubectl drain.
Question 626
Following this Kubernetes scenario, an operator validates remediation: A team thinks applying an ingress-only policy prevents Pods from sending outbound traffic. Which measurable outcome shows success?
- Disallowed outbound connections fail while approved egress stays functional.
- Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
- In-cluster clients reach the Service while no direct external listener is created.
- The route resolves the backend reference without opening unrelated namespace access.
Explanation
Correct Answer
A:Disallowed outbound connections fail while approved egress stays functional. The corresponding action is: Define egress policy types and explicit egress rules if outbound isolation is required.
Incorrect Answers
B:Repeated traffic from one source IP is directed consistently while healthy endpoints exist. This is evidence for a separate case (A legacy client needs repeated requests to tend to the same Pod behind one Service.), not for the target problem. An appropriate validation would be: Disallowed outbound connections fail while approved egress stays functional.
C:In-cluster clients reach the Service while no direct external listener is created. This is evidence for a separate case (An internal backend should only be reachable from inside the cluster through one stable address.), not for the target problem. An appropriate validation would be: Disallowed outbound connections fail while approved egress stays functional.
D:The route resolves the backend reference without opening unrelated namespace access. This is evidence for a separate case (A Gateway API route in namespace web needs to refer to a backend Service in namespace shared.), not for the target problem. An appropriate validation would be: Disallowed outbound connections fail while approved egress stays functional.
Question 627
During cluster maintenance, an engineer finds this problem: A Pod must resolve a private test hostname using a custom resolver without changing cluster-wide DNS. Which next action is technically justified?
- Align the Service selector with ready Pod labels and verify endpoint membership.
- Configure a NodePort Service with the appropriate servicePort, targetPort and allowed nodePort.
- Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately.
- Set appropriate Service ipFamilyPolicy and ipFamilies supported by the cluster and network.
Explanation
Correct Answer
C:Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately. This correction targets the specific failure. Per-Pod DNS policy and dnsConfig can override resolver behavior. A successful result is: The Pod resolves the test hostname through the specified nameserver.
Incorrect Answers
A:Align the Service selector with ready Pod labels and verify endpoint membership.
B:Configure a NodePort Service with the appropriate servicePort, targetPort and allowed nodePort. This procedure belongs to a different Kubernetes condition (A development Service must be reachable on each eligible node at a defined node port.). It does not directly resolve the observed failure. The targeted action is: Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately.
D:Set appropriate Service ipFamilyPolicy and ipFamilies supported by the cluster and network. This procedure belongs to a different Kubernetes condition (A dual-stack cluster Service was created with only IPv4 despite an IPv6 requirement.). It does not directly resolve the observed failure. The targeted action is: Set dnsPolicy None and configure the Pod's dnsConfig nameservers and searches appropriately.
Question 628
A Kubernetes operations team observes the following: Two StatefulSet replicas accidentally share one manually named PVC and interfere with each other. What is the MOST appropriate corrective action?
- Choose a suitable storage access pattern or keep the volume attached to an allowed node.
- Use StatefulSet volumeClaimTemplates for per-replica persistent storage.
- Use persistent storage backed by a PVC for data that must survive Pod deletion.
- Enable supported volume expansion and increase PVC requested storage safely.
Explanation
Correct Answer
B:Use StatefulSet volumeClaimTemplates for per-replica persistent storage. This correction targets the specific failure. StatefulSet claim templates provision stable volumes associated with ordinal identities. A successful result is: Each ordinal has its own claim and retains data across Pod recreation.
Incorrect Answers
A:Choose a suitable storage access pattern or keep the volume attached to an allowed node. This procedure belongs to a different Kubernetes condition (Two Pods on different nodes try to attach the same RWO block volume and one remains Pending.). It does not directly resolve the observed failure. The targeted action is: Use StatefulSet volumeClaimTemplates for per-replica persistent storage.
C:Use persistent storage backed by a PVC for data that must survive Pod deletion.
D:Enable supported volume expansion and increase PVC requested storage safely. This procedure belongs to a different Kubernetes condition (A PVC is nearly full and its backing CSI driver supports growth.). It does not directly resolve the observed failure. The targeted action is: Use StatefulSet volumeClaimTemplates for per-replica persistent storage.
Question 629
For this Kubernetes issue, select TWO statements that correctly pair a response with the evidence it should produce: Traffic to /api is routed to the frontend Service rather than the API backend.
- Remediation: Configure listener TLS certificateRefs to an accessible matching Secret and accepted hostname.
- Remediation: Correct Ingress paths and pathType mapping to the proper Service backends.
- Remediation: Use a wildcard host to fix a mismatched backend Service reference.
- Validation: Service IP allocation matches the supported IPv4/IPv6 policy and connectivity works on desired families.
- Validation: Requests to /api reach the API and / reach the frontend.
Explanation
Correct Answers
B:Remediation: Correct Ingress paths and pathType mapping to the proper Service backends. The remedy targets the reported failure rather than a different subsystem. Ingress path routing depends on explicit path rules and controller semantics.
E:Validation: Requests to /api reach the API and / reach the frontend. This result verifies the behavior the remediation is supposed to restore.
Incorrect Answers
A:Remediation: Configure listener TLS certificateRefs to an accessible matching Secret and accepted hostname. This action targets a different condition (A Gateway HTTPS listener reports invalid certificate references.), not this reported failure: Traffic to /api is routed to the frontend Service rather than the API backend.
C:Remediation: Use a wildcard host to fix a mismatched backend Service reference. This is the unsafe shortcut for the case, not an acceptable intervention. Ingress path routing depends on explicit path rules and controller semantics.
D:Validation: Service IP allocation matches the supported IPv4/IPv6 policy and connectivity works on desired families. This evidence applies to a different condition (A dual-stack cluster Service was created with only IPv4 despite an IPv6 requirement.), and would not verify this target fix: Traffic to /api is routed to the frontend Service rather than the API backend.
Question 630
A CKA learner must investigate the following: All kubectl API calls fail following an edit to kube-apiserver static Pod YAML. Which command or check supplies the MOST direct diagnostic evidence?
- Run kubectl top nodes and kubectl top pods --containers --all-namespaces.
- Examine /etc/kubernetes/manifests/kube-apiserver.yaml and crictl ps -a.
- Inspect kube-controller-manager static Pod logs and Deployment status conditions.
- Test the Pod IP directly on 8080 then inspect Service ports and EndpointSlices.
Explanation
Correct Answer
B:Examine /etc/kubernetes/manifests/kube-apiserver.yaml and crictl ps -a. This diagnostic examines the relevant resource or subsystem. Kubelet manages the kubeadm control-plane static Pod from a local manifest. The validating result would be: The API server static Pod starts and kubectl connectivity returns.
Incorrect Answers
A:This check is appropriate to the separate problem (A node reports high CPU use and latency spikes while the scheduler keeps assigning Pods.), but it is not the direct diagnostic for the described failure.
C:Inspect kube-controller-manager static Pod logs and Deployment status conditions. This check is appropriate to the separate problem (ReplicaSets stop creating replacement Pods after kube-controller-manager crashes.), but it is not the direct diagnostic for the described failure. The relevant check is: Examine /etc/kubernetes/manifests/kube-apiserver.yaml and crictl ps -a.
D:This check is appropriate to the separate problem (A Service has healthy endpoints but its targetPort points to 9090 while Pods listen on 8080.), but it is not the direct diagnostic for the described failure. Test the Pod IP directly on 8080 then inspect Service ports and EndpointSlices.