CNCF CKA Practice Test 35
Question 340
During cluster maintenance, an engineer finds this problem: A Pod is stuck ContainerCreating due to an attach timeout from a cloud block volume. Which next action is technically justified?
- Inspect CSI controller, node plugin and VolumeAttachment state then restore the failing attachment path.
- Provide a compatible PV or a suitable StorageClass provisioner with enough requested capacity.
- Use ReadWriteOncePod with a compatible CSI environment when strict single-Pod ownership is required.
- Enable supported volume expansion and increase PVC requested storage safely.
Explanation
Correct Answer
A:Inspect CSI controller, node plugin and VolumeAttachment state then restore the failing attachment path. This correction targets the specific failure. CSI attachment and mounting rely on healthy controller and node components. A successful result is: VolumeAttachment becomes healthy and the Pod mounts its claim.
Incorrect Answers
B:Provide a compatible PV or a suitable StorageClass provisioner with enough requested capacity.
C:This procedure belongs to a different Kubernetes condition (A database requires exclusive access by exactly one Pod to a PVC.). Use ReadWriteOncePod with a compatible CSI environment when strict single-Pod ownership is required.
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: Inspect CSI controller, node plugin and VolumeAttachment state then restore the failing attachment path.
Question 341
An administrator reviews several possible responses to this condition: A cleanup should run nightly but prevent overlapping executions. Which option creates an avoidable failure?
- Test connectivity from the affected Pod before redesigning all Services.
- Review controller logs and resource status to understand reconciliation failures.
- Assume concurrencyPolicy Allow automatically prevents overlap.
- Inspect the exact Secret or ConfigMap reference without exposing credentials.
Explanation
Correct Answer
C:Assume concurrencyPolicy Allow automatically prevents overlap. CronJob concurrency policy controls overlapping scheduled executions. A safer course is: Create a CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe.
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: Create a CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe.
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 CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe.
D:Inspect the exact Secret or ConfigMap reference without exposing credentials. Configuration errors can be diagnosed without leaking sensitive data. For the stated case, a focused correction is: Create a CronJob with schedule and concurrencyPolicy Forbid if overlap is unsafe.
Question 342
During cluster maintenance, an engineer finds this problem: Pods on one worker fail while the node reports DiskPressure. Which next action is technically justified?
- Read the prior container instance logs using the --previous option.
- Inspect image, container log and ephemeral-storage usage and reclaim space safely.
- Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
- Apply an approved toleration or choose an eligible untainted node.
Explanation
Correct Answer
B:Inspect image, container log and ephemeral-storage usage and reclaim space safely. This correction targets the specific failure. Image and ephemeral filesystem consumption can trigger node disk pressure and evictions. A successful result is: The node clears DiskPressure and Pods can start with sufficient ephemeral storage.
Incorrect Answers
A:Read the prior container instance logs using the --previous option. This procedure belongs to a different Kubernetes condition (An app container restarts so quickly that current kubectl logs show only its latest attempt.). It does not directly resolve the observed failure. The targeted action is: Inspect image, container log and ephemeral-storage usage and reclaim space safely.
C:This procedure belongs to a different Kubernetes condition (Pods cannot resolve cluster Service names and CoreDNS Pods are CrashLoopBackOff.). Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
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 image, container log and ephemeral-storage usage and reclaim space safely.
Question 343
A Kubernetes operations team observes the following: The main app never starts because an initContainer image is inaccessible. What is the MOST appropriate corrective action?
- Correct the initContainer image location or pull credentials.
- Inspect CNI IPAM allocation and capacity, then expand supported address space or workload placement.
- Resolve PVC provisioning or binding before expecting the scheduler to place the Pod.
- Review current and previous container logs and correct the referenced configuration.
Explanation
Correct Answer
A:Correct the initContainer image location or pull credentials. This correction targets the specific failure. InitContainer failures block ordinary container startup. A successful result is: Initialization succeeds and main containers can start.
Incorrect Answers
B:Inspect CNI IPAM allocation and capacity, then expand supported address space or workload placement.
C:This procedure belongs to a different Kubernetes condition (A Pod is Pending with a message about unbound immediate PersistentVolumeClaims.). Resolve PVC provisioning or binding before expecting the scheduler to place the Pod.
D:This procedure belongs to a different Kubernetes condition (A newly deployed app repeatedly exits with invalid configuration errors.). Review current and previous container logs and correct the referenced configuration.
Question 344
A reviewer wants proof that this issue was corrected: Egress-isolated Pods cannot resolve DNS even though their app traffic policy is correct. Which observed result is the STRONGEST evidence?
- DNS queries succeed while other disallowed egress remains denied.
- Ready endpoints include all healthy replicas and service requests balance accordingly.
- Service IP allocation matches the supported IPv4/IPv6 policy and connectivity works on desired families.
- The hostNetwork Pod resolves Kubernetes Service records as intended.
Explanation
Correct Answer
A:DNS queries succeed while other disallowed egress remains denied. The corresponding action is: Add a narrowly scoped egress allowance for DNS UDP/TCP 53 to the intended resolver endpoints.
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: DNS queries succeed while other disallowed egress remains denied.
C:Service IP allocation matches the supported IPv4/IPv6 policy and connectivity works on desired families. This is evidence for a separate case (A dual-stack cluster Service was created with only IPv4 despite an IPv6 requirement.), not for the target problem. An appropriate validation would be: DNS queries succeed while other disallowed egress remains denied.
D:The hostNetwork Pod resolves Kubernetes Service records as intended. This is evidence for a separate case (A hostNetwork Pod cannot resolve cluster Services using its inherited host resolver configuration.), not for the target problem. An appropriate validation would be: DNS queries succeed while other disallowed egress remains denied.
Question 345
A Kubernetes operations team observes the following: A worker transitions to MemoryPressure and several application Pods are evicted. What is the MOST appropriate corrective action?
- Inspect current context and configured cluster server address, then choose the correct target.
- Inspect PVC binding, VolumeAttachment and CSI node plugin logs and fix the storage path.
- Inspect etcd endpoint health, disk latency, quorum and certificate connectivity.
- Identify memory consumers, verify requests and limits and relieve pressure with safe workload/capacity changes.
Explanation
Correct Answer
D:Identify memory consumers, verify requests and limits and relieve pressure with safe workload/capacity changes. This correction targets the specific failure. Node memory pressure can trigger evictions according to resource availability and Pod QoS. A successful result is: MemoryPressure clears and essential Pods remain Ready without repeated eviction.
Incorrect Answers
A:Inspect current context and configured cluster server address, then choose the correct target.
B:This procedure belongs to a different Kubernetes condition (A Pod remains ContainerCreating with MountVolume.SetUp failed errors.). Inspect PVC binding, VolumeAttachment and CSI node plugin logs and fix the storage path.
C:This procedure belongs to a different Kubernetes condition (The API server is slow and logs show etcd request timeouts.). Inspect etcd endpoint health, disk latency, quorum and certificate connectivity.
Question 346
A cluster team is handling this situation: A Gateway exists but an HTTPRoute is not attached to its listener. Which proposed shortcut should be REJECTED?
- Validate a change with a repeatable positive and negative test.
- Use a staged rollout and observe readiness before full deployment.
- Record a rollback approach before high-impact control-plane changes.
- Change Service ClusterIP to NodePort without checking the route parent.
Explanation
Correct Answer
D:Change Service ClusterIP to NodePort without checking the route parent. Gateway listener constraints and route parent relationships determine attachment. A safer course is: Correct HTTPRoute parentRefs, hostname and listener compatibility with the Gateway.
Incorrect Answers
A: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: Correct HTTPRoute parentRefs, hostname and listener compatibility with the Gateway.
B: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: Correct HTTPRoute parentRefs, hostname and listener compatibility with the Gateway.
C:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Correct HTTPRoute parentRefs, hostname and listener compatibility with the Gateway.
Question 347
To avoid guessing about this fault, what should be inspected first? Two clusters need the same base manifest but different replica counts and labels.
- Check load-balancer health and kubeconfig server addresses against the shared endpoint.
- Run kubectl describe pod in kube-system and check kubelet or container logs as appropriate.
- Inspect kube-apiserver advertise-address and test TCP connectivity to the intended endpoint.
- Run kubectl kustomize overlays/staging and compare to overlays/prod output.
Explanation
Correct Answer
D:Run kubectl kustomize overlays/staging and compare to overlays/prod output. This diagnostic examines the relevant resource or subsystem. Kustomize composes declarative resources without requiring separate duplicated manifests. The validating result would be: Rendered manifests share the base while environment-specific patches differ as intended.
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. Run kubectl kustomize overlays/staging and compare to overlays/prod output.
B:This check is appropriate to the separate problem (A new control-plane component does not appear ready after a manifest update.), but it is not the direct diagnostic for the described failure. Run kubectl kustomize overlays/staging and compare to overlays/prod output.
C:This check is appropriate to the separate problem (A kubeadm init uses an advertise address unreachable from joining nodes.), but it is not the direct diagnostic for the described failure.
Question 348
During remediation, this failure appears: After a certificate renewal, an old static Pod process still uses expired credentials. Which action is the LEAST defensible?
- Preserve relevant logs when diagnosing a repeating container crash.
- Use a staged rollout and observe readiness before full deployment.
- Assume certificate files on disk always update process memory instantly.
- Test connectivity from the affected Pod before redesigning all Services.
Explanation
Correct Answer
C:Assume certificate files on disk always update process memory instantly. Renewed certificate files may not be reloaded until components restart. A safer course is: Ensure the affected component reloads renewed credentials through an approved restart or manifest-triggered recreation.
Incorrect Answers
A:Preserve relevant logs when diagnosing a repeating container crash. This is an appropriate safeguard, not the unsafe shortcut. Prior process output often identifies the immediate cause. For the stated case, a focused correction is: Ensure the affected component reloads renewed credentials through an approved restart or manifest-triggered recreation.
B: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: Ensure the affected component reloads renewed credentials through an approved restart or manifest-triggered recreation.
D: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: Ensure the affected component reloads renewed credentials through an approved restart or manifest-triggered recreation.
Question 349
An administrator reviews several possible responses to this condition: An external HTTP service needs an infrastructure-managed public listener. Which option creates an avoidable failure?
- Assume every bare-metal cluster automatically receives a public IP without a controller.
- Inspect the exact Secret or ConfigMap reference without exposing credentials.
- Keep backups or change history for potentially destructive maintenance.
- Record a rollback approach before high-impact control-plane changes.
Explanation
Correct Answer
A:Assume every bare-metal cluster automatically receives a public IP without a controller. LoadBalancer services rely on an implementation or cloud integration to provision external access. A safer course is: Use a LoadBalancer Service backed by a working provider integration.
Incorrect Answers
B:Inspect the exact Secret or ConfigMap reference without exposing credentials. Configuration errors can be diagnosed without leaking sensitive data. For the stated case, a focused correction is: Use a LoadBalancer Service backed by a working provider integration.
C: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: Use a LoadBalancer Service backed by a working provider integration.
D:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Use a LoadBalancer Service backed by a working provider integration.
Question 350
An engineer reports that this problem was fixed: ReplicaSets stop creating replacement Pods after kube-controller-manager crashes. What specific result should an independent reviewer expect?
- Container starts and readiness recovers without repeated exits.
- Only the approved API-to-database traffic succeeds under policy enforcement.
- Replica controllers reconcile desired Pods and restore replica counts.
- kubectl reaches the intended API endpoint without changing workloads.
Explanation
Correct Answer
C:Replica controllers reconcile desired Pods and restore replica counts. The corresponding action is: Recover the controller-manager static Pod and verify its health and API permissions.
Incorrect Answers
A:Container starts and readiness recovers without repeated exits. This is evidence for a separate case (A newly deployed app repeatedly exits with invalid configuration errors.), not for the target problem. An appropriate validation would be: Replica controllers reconcile desired Pods and restore replica counts.
B:Only the approved API-to-database traffic succeeds under policy enforcement. This is evidence for a separate case (After a default-deny NetworkPolicy, a required API-to-database connection times out.), not for the target problem. An appropriate validation would be: Replica controllers reconcile desired Pods and restore replica counts.
D: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: Replica controllers reconcile desired Pods and restore replica counts.