CNCF CKA Practice Test 24
Question 230
During remediation, this failure appears: kubeadm reports multiple CRI sockets and cannot select the runtime. Which action is the LEAST defensible?
- Edit every workload image to fix a node runtime endpoint error.
- Check applicable component version compatibility before upgrading.
- Apply scoped access rather than granting universal administration.
- Use a staged rollout and observe readiness before full deployment.
Explanation
Correct Answer
A:Edit every workload image to fix a node runtime endpoint error. Kubelet communicates with a CRI-compatible runtime at a valid socket. A safer course is: Specify the intended working CRI socket in kubeadm configuration and verify runtime health.
Incorrect Answers
B:Check applicable component version compatibility before upgrading. Supported version relationships prevent avoidable upgrade failures. For the stated case, a focused correction is: Specify the intended working CRI socket in kubeadm configuration and verify runtime health.
C:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Specify the intended working CRI socket in kubeadm configuration and verify runtime health.
D: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: Specify the intended working CRI socket in kubeadm configuration and verify runtime health.
Question 231
A CKA learner must investigate the following: An administrator cordoned a node but existing Pods are still running on it. Which command or check supplies the MOST direct diagnostic evidence?
- Compare kubectl get pods -o wide before and after kubectl cordon and kubectl drain.
- Inspect journalctl -u kubelet and kubelet configuration alongside swapon --show.
- Inspect etcd manifest listen-client-urls and test etcdctl endpoint health with proper TLS flags.
- Run helm history addon -n system and helm rollback addon <revision> -n system.
Explanation
Correct Answer
A:Cordon changes scheduling eligibility but does not terminate current Pods. The validating result would be: Workloads are evicted or intentionally retained according to policy, not merely marked unschedulable.
Incorrect Answers
B:This check is appropriate to the separate problem (An intended kubeadm worker reports kubelet swap-related startup failures.), 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.
C:This check is appropriate to the separate problem (etcdctl endpoint health fails on a local stacked-etcd member with a TLS handshake error.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (A Helm upgrade caused a regression in a cluster add-on.), but it is not the direct diagnostic for the described failure.
Question 232
Following this Kubernetes scenario, an operator validates remediation: Two API servers run but workloads use one control-plane node IP as the endpoint. Which measurable outcome shows success?
- kubectl and joining nodes remain able to reach the API when one control-plane node fails.
- Control-plane and node versions remain within supported relationships after rollout.
- Allowed updates to the named object succeed while edits to unrelated ConfigMaps are rejected.
- The new node trusts and joins the expected API server without accepting an arbitrary endpoint.
Explanation
Correct Answer
A:Kubectl and joining nodes remain able to reach the API when one control-plane node fails. The corresponding action is: Configure a stable shared controlPlaneEndpoint behind a correctly configured API server load balancer.
Incorrect Answers
B:Control-plane and node versions remain within supported relationships after rollout. This is evidence for a separate case (A proposed upgrade would run kubelet newer than kube-apiserver.), not for the target problem. An appropriate validation would be: kubectl and joining nodes remain able to reach the API when one control-plane node fails.
C:Allowed updates to the named object succeed while edits to unrelated ConfigMaps are rejected. This is evidence for a separate case (An operator must update one named ConfigMap but must not edit every ConfigMap.), not for the target problem. An appropriate validation would be: kubectl and joining nodes remain able to reach the API when one control-plane node fails.
D:The new node trusts and joins the expected API server without accepting an arbitrary endpoint. This is evidence for a separate case (A worker join fails with a discovery CA certificate hash mismatch.), not for the target problem. An appropriate validation would be: kubectl and joining nodes remain able to reach the API when one control-plane node fails.
Question 233
During an operational review, this fact emerges: A Service has healthy endpoints but its targetPort points to 9090 while Pods listen on 8080. Which Kubernetes behavior MOST directly governs the result?
- Healthy endpoints do not compensate for incorrect TCP/UDP port mapping.
- Kubernetes Secret references are namespaced and need valid names and keys.
- Ingress controller routing matches requested host/path against explicit rules.
- External egress requires network routing beyond internal Service discovery.
Explanation
Correct Answer
A:Healthy endpoints do not compensate for incorrect TCP/UDP port mapping. This principle explains the targeted result. A concrete response is: Correct targetPort or named container port mapping to the actual listener.
Incorrect Answers
B:Kubernetes Secret references are namespaced and need valid names and keys. This principle is useful for another case (A Deployment's Pods report CreateContainerConfigError due to a missing Secret.), but does not explain the most direct solution here. The governing consideration is: Healthy endpoints do not compensate for incorrect TCP/UDP port mapping.
C: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. Healthy endpoints do not compensate for incorrect TCP/UDP port mapping.
D:This principle is useful for another case (Pods reach cluster Services but cannot contact external APIs from private node networks.), but does not explain the most direct solution here.
Question 234
An administrator is investigating this situation: An API must accept ingress only from Pods labeled role=client in namespace team-a. Which action BEST resolves the underlying issue?
- Set Service targetPort to the actual container listening port while retaining desired Service port.
- Set appropriate Service ipFamilyPolicy and ipFamilies supported by the cluster and network.
- Inspect CoreDNS forward configuration, upstream resolver reachability and network policies.
- Create an ingress policy selecting the API Pods with combined namespaceSelector and podSelector peer criteria.
Explanation
Correct Answer
D:Create an ingress policy selecting the API Pods with combined namespaceSelector and podSelector peer criteria. This correction targets the specific failure. A single NetworkPolicy peer combining namespaceSelector and podSelector intersects their selection criteria. A successful result is: Only the intended client Pods in team-a can reach the protected API.
Incorrect Answers
A:This procedure belongs to a different Kubernetes condition (A Service listens on port 80 but the container listens on 8080 and requests fail.). Set Service targetPort to the actual container listening port while retaining desired Service port.
B:This procedure belongs to a different Kubernetes condition (A dual-stack cluster Service was created with only IPv4 despite an IPv6 requirement.). Set appropriate Service ipFamilyPolicy and ipFamilies supported by the cluster and network.
C:This procedure belongs to a different Kubernetes condition (Internal Service names resolve but Pods cannot resolve public domains through CoreDNS.). Inspect CoreDNS forward configuration, upstream resolver reachability and network policies.
Question 235
A review finds this Kubernetes issue: A team mistakes the container network interface for the container runtime interface. Which suggestion would make troubleshooting or security worse?
- Test connectivity from the affected Pod before redesigning all Services.
- Install a CSI driver and assume it provides Pod network connectivity.
- Verify the target cluster and namespace before mutating resources.
- Apply scoped access rather than granting universal administration.
Explanation
Correct Answer
B:Install a CSI driver and assume it provides Pod network connectivity. CNI, CRI and CSI solve different cluster extension problems. A safer course is: Select a compatible CNI for Pod networking and separately verify CRI runtime integration.
Incorrect Answers
A: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: Select a compatible CNI for Pod networking and separately verify CRI runtime integration.
C: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: Select a compatible CNI for Pod networking and separately verify CRI runtime integration.
D:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Select a compatible CNI for Pod networking and separately verify CRI runtime integration.
Question 236
A cluster team is handling this situation: Frontend Pods can unexpectedly connect to every Pod in a sensitive namespace. Which proposed shortcut should be REJECTED?
- Choose a storage access mode backed by real CSI capabilities.
- Review controller logs and resource status to understand reconciliation failures.
- Create a policy with an empty podSelector and unrestricted ingress rules and call it default deny.
- Use a staged rollout and observe readiness before full deployment.
Explanation
Correct Answer
C:A safer course is: Create a default-deny ingress NetworkPolicy for the sensitive namespace, then allow required traffic.
Incorrect Answers
A: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: Create a default-deny ingress NetworkPolicy for the sensitive namespace, then allow required traffic.
B: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: Create a default-deny ingress NetworkPolicy for the sensitive namespace, then allow required traffic.
D: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: Create a default-deny ingress NetworkPolicy for the sensitive namespace, then allow required traffic.
Question 237
An engineer needs to justify a change for this issue: A Service listens on port 80 but the container listens on 8080 and requests fail. Which technical reason is MOST relevant?
- Weighted HTTPRoute backends can express proportional request routing when supported.
- Service port and targetPort express different ends of routing.
- Ingress objects need a supporting controller to implement routing.
- Ingress path routing depends on explicit path rules and controller semantics.
Explanation
Correct Answer
B:Service port and targetPort express different ends of routing. This principle explains the targeted result. A concrete response is: Set Service targetPort to the actual container listening port while retaining desired Service port.
Incorrect Answers
A:This principle is useful for another case (A Gateway API team wants to send 10 percent traffic to canary and 90 percent to stable.), but does not explain the most direct solution here. Service port and targetPort express different ends of routing.
C:Ingress objects need a supporting controller to implement routing. This principle is useful for another case (An Ingress resource has an address but no controller is processing its rules.), but does not explain the most direct solution here. The governing consideration is: Service port and targetPort express different ends of routing.
D:This principle is useful for another case (Traffic to /api is routed to the frontend Service rather than the API backend.), but does not explain the most direct solution here. Service port and targetPort express different ends of routing.
Question 238
Select TWO technically sound statements for this situation, covering remediation and validation: A worker transitions to MemoryPressure and several application Pods are evicted.
- Remediation: Identify memory consumers, verify requests and limits and relieve pressure with safe workload/capacity changes.
- Validation: kubectl reaches the intended API endpoint without changing workloads.
- Remediation: Increase every memory limit without checking available node RAM.
- Remediation: Correct the Service selector to match actual intended backend labels.
- Validation: MemoryPressure clears and essential Pods remain Ready without repeated eviction.
Explanation
Correct Answers
A:Remediation: Identify memory consumers, verify requests and limits and relieve pressure with safe workload/capacity changes. The remedy targets the reported failure rather than a different subsystem. Node memory pressure can trigger evictions according to resource availability and Pod QoS.
E:Validation: MemoryPressure clears and essential Pods remain Ready without repeated eviction. This result verifies the behavior the remediation is supposed to restore.
Incorrect Answers
B:Validation: kubectl reaches the intended API endpoint without changing workloads. This evidence applies to a different condition (kubectl suddenly reports connection refused after the team changed contexts.), and would not verify this target fix: A worker transitions to MemoryPressure and several application Pods are evicted.
C:Remediation: Increase every memory limit without checking available node RAM. This is the unsafe shortcut for the case, not an acceptable intervention. Node memory pressure can trigger evictions according to resource availability and Pod QoS.
D:Remediation: Correct the Service selector to match actual intended backend labels. This action targets a different condition (A newly deployed Service selector uses app=front while Pods are labeled app=frontend.), not this reported failure: A worker transitions to MemoryPressure and several application Pods are evicted.
Question 239
A cluster team is handling this situation: A node appears idle by CPU usage but a new Pod is unschedulable with Insufficient cpu. Which proposed shortcut should be REJECTED?
- Ignore high requests just because current utilization appears low.
- Inspect Pod and component events before changing unrelated resources.
- Verify the target cluster and namespace before mutating resources.
- Apply scoped access rather than granting universal administration.
Explanation
Correct Answer
A:Ignore high requests just because current utilization appears low. Scheduler placement is based on requests and allocatable capacity, not instant kubectl top usage. A safer course is: Compare resource requests against node allocatable rather than only live CPU utilization.
Incorrect Answers
B:Inspect Pod and component events before changing unrelated resources. Observed events help locate the failing subsystem before a change. For the stated case, a focused correction is: Compare resource requests against node allocatable rather than only live CPU utilization.
C: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: Compare resource requests against node allocatable rather than only live CPU utilization.
D:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Compare resource requests against node allocatable rather than only live CPU utilization.
Question 240
An operations team tests its response to this finding: After a malformed YAML edit, kubelet stops running kube-controller-manager. Which outcome most clearly establishes that the fix worked?
- The static Pod reappears and the component starts successfully.
- The identified workload and node saturation explain latency and a targeted capacity change restores headroom.
- kubectl reaches the intended API endpoint without changing workloads.
- The HTTPRoute reference resolves and accepted traffic reaches intended backends.
Explanation
Correct Answer
A:The static Pod reappears and the component starts successfully. This outcome shows the required behavior after correction. The corresponding action is: Validate static Pod YAML syntax and restore the last correct manifest version.
Incorrect Answers
B: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: The static Pod reappears and the component starts successfully.
C:Kubectl reaches the intended API endpoint without changing workloads. This is evidence for a separate case (kubectl suddenly reports connection refused after the team changed contexts.), not for the target problem. An appropriate validation would be: The static Pod reappears and the component starts successfully.
D: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 static Pod reappears and the component starts successfully.