CNCF CKA Practice Test 38
Question 370
A CKA learner must investigate the following: A namespace user can list Pods in dev but receives Forbidden in prod. Which command or check supplies the MOST direct diagnostic evidence?
- Use kubectl auth can-i list pods -n prod --as=developer and repeat against an unauthorized namespace.
- Run kubeadm config validate against the intended version and inspect kubeadm config print init-defaults.
- Inspect kubectl get crds and kubectl api-resources for the expected plural and API version.
- Check kubectl drain worker-1 --ignore-daemonsets with appropriate flags and verify remaining endpoints.
Explanation
Correct Answer
A:The validating result would be: An authorization check succeeds for the approved pod operation in prod and remains denied elsewhere.
Incorrect Answers
B: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. Use kubectl auth can-i list pods -n prod --as=developer and repeat against an unauthorized namespace.
C:This check is appropriate to the separate problem (A custom resource cannot be created because the API server does not recognize its kind.), but it is not the direct diagnostic for the described failure. Use kubectl auth can-i list pods -n prod --as=developer and repeat against an unauthorized namespace.
D:This check is appropriate to the separate problem (A worker requires OS maintenance while running replicated customer Pods.), but it is not the direct diagnostic for the described failure. Use kubectl auth can-i list pods -n prod --as=developer and repeat against an unauthorized namespace.
Question 371
A review finds this Kubernetes issue: New claims omit storageClassName and use an unintended slow storage provider. Which suggestion would make troubleshooting or security worse?
- Keep backups or change history for potentially destructive maintenance.
- Use a staged rollout and observe readiness before full deployment.
- Delete every PVC and assume an old PV will switch classes automatically.
- Verify the target cluster and namespace before mutating resources.
Explanation
Correct Answer
C:Delete every PVC and assume an old PV will switch classes automatically. Default StorageClasses influence requests that do not explicitly select a class. A safer course is: Configure the intended default StorageClass annotation while checking existing defaults.
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: Configure the intended default StorageClass annotation while checking existing defaults.
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: Configure the intended default StorageClass annotation while checking existing defaults.
D: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: Configure the intended default StorageClass annotation while checking existing defaults.
Question 372
A review finds this Kubernetes issue: Pods cannot resolve cluster Service names and CoreDNS Pods are CrashLoopBackOff. Which suggestion would make troubleshooting or security worse?
- Check applicable component version compatibility before upgrading.
- Record a rollback approach before high-impact control-plane changes.
- Validate a change with a repeatable positive and negative test.
- Replace every Service name with a random static IP rather than fixing DNS.
Explanation
Correct Answer
D:Replace every Service name with a random static IP rather than fixing DNS. Malformed DNS plugin configuration can disable cluster name resolution. A safer course is: Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
Incorrect Answers
A:Check applicable component version compatibility before upgrading. Supported version relationships prevent avoidable upgrade failures. For the stated case, a focused correction is: Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
B:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
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: Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
Question 373
The team is reviewing this failure mode: An application password is mistakenly embedded in a ConfigMap and exposed to broad readers. Which statement explains WHY the recommended control works?
- Secrets support sensitive configuration but still require RBAC and encryption controls.
- CronJob concurrency policy controls overlapping scheduled executions.
- Liveness probes trigger container recovery when the application cannot progress.
- DaemonSets reconcile per-node agent placement rather than a fixed total replica count.
Explanation
Correct Answer
A:Secrets support sensitive configuration but still require RBAC and encryption controls. This principle explains the targeted result. A concrete response is: Move the value into a Secret and restrict access with narrowly scoped RBAC.
Incorrect Answers
B:CronJob concurrency policy controls overlapping scheduled executions. This principle is useful for another case (A cleanup should run nightly but prevent overlapping executions.), but does not explain the most direct solution here. The governing consideration is: Secrets support sensitive configuration but still require RBAC and encryption controls.
C: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: Secrets support sensitive configuration but still require RBAC and encryption controls.
D:This principle is useful for another case (Each worker needs exactly one log-collector Pod when nodes are added.), but does not explain the most direct solution here. Secrets support sensitive configuration but still require RBAC and encryption controls.
Question 374
During remediation, this failure appears: All kubectl API calls fail following an edit to kube-apiserver static Pod YAML. Which action is the LEAST defensible?
- Review controller logs and resource status to understand reconciliation failures.
- Confirm actual node conditions and allocatable resources before scheduling changes.
- Create a new ClusterIP Service and assume it resurrects the API server process.
- Record a rollback approach before high-impact control-plane changes.
Explanation
Correct Answer
C:Create a new ClusterIP Service and assume it resurrects the API server process. Kubelet manages the kubeadm control-plane static Pod from a local manifest. A safer course is: Inspect and correct the control-plane static Pod manifest and kubelet runtime logs.
Incorrect Answers
A: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: Inspect and correct the control-plane static Pod manifest and kubelet runtime logs.
B:Confirm actual node conditions and allocatable resources before scheduling changes. Scheduler behavior must be assessed against real node constraints. For the stated case, a focused correction is: Inspect and correct the control-plane static Pod manifest and kubelet runtime logs.
D:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Inspect and correct the control-plane static Pod manifest and kubelet runtime logs.
Question 375
A CKA learner must investigate the following: A PVC stays Pending because it asks for 20Gi while the only matching PV has 10Gi. Which command or check supplies the MOST direct diagnostic evidence?
- Describe the claim and compare capacity and access modes using kubectl get pv,pvc -o wide.
- Inspect StorageClasses for storageclass.kubernetes.io/is-default-class annotation.
- Run kubectl describe pod -n application and kubectl get pvc -n application.
- Inspect PV persistentVolumeReclaimPolicy and bound/released state before cleanup.
Explanation
Correct Answer
A:Describe the claim and compare capacity and access modes using kubectl get pv,pvc -o wide. This diagnostic examines the relevant resource or subsystem. PVC binding requires matching capacity, access mode and other volume constraints. The validating result would be: The PVC becomes Bound to a compatible volume and its Pod can mount it.
Incorrect Answers
B:This check is appropriate to the separate problem (New claims omit storageClassName and use an unintended slow storage provider.), but it is not the direct diagnostic for the described failure. Describe the claim and compare capacity and access modes using kubectl get pv,pvc -o wide.
C:This check is appropriate to the separate problem (A Pod reports FailedMount because its referenced PVC exists in a different namespace.), but it is not the direct diagnostic for the described failure. Describe the claim and compare capacity and access modes using kubectl get pv,pvc -o wide.
D:This check is appropriate to the separate problem (A StatefulSet is decommissioned but its underlying audit volume must remain for investigation.), but it is not the direct diagnostic for the described failure. Describe the claim and compare capacity and access modes using kubectl get pv,pvc -o wide.
Question 376
An administrator is investigating this situation: A new worker never registers though kubeadm join exited with an error. Which action BEST resolves the underlying issue?
- Inspect kubeadm join output, API endpoint, token and discovery CA trust before retrying.
- Diagnose metrics-server, metrics API availability and resource requests.
- Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
- Correct targetPort or named container port mapping to the actual listener.
Explanation
Correct Answer
A:Inspect kubeadm join output, API endpoint, token and discovery CA trust before retrying. This correction targets the specific failure. Node bootstrap failures must be distinguished from post-registration scheduling faults. A successful result is: The node registers with the intended cluster and becomes Ready.
Incorrect Answers
B:Diagnose metrics-server, metrics API availability and resource requests. This procedure belongs to a different Kubernetes condition (HPA displays <unknown> target metrics while replicas never scale.). It does not directly resolve the observed failure. The targeted action is: Inspect kubeadm join output, API endpoint, token and discovery CA trust before retrying.
C:Review CoreDNS logs and Corefile configuration, then restore a valid DNS Deployment.
D:Correct targetPort or named container port mapping to the actual listener. This procedure belongs to a different Kubernetes condition (A Service has healthy endpoints but its targetPort points to 9090 while Pods listen on 8080.). It does not directly resolve the observed failure. The targeted action is: Inspect kubeadm join output, API endpoint, token and discovery CA trust before retrying.
Question 377
A review finds this Kubernetes issue: etcdctl endpoint health fails on a local stacked-etcd member with a TLS handshake error. Which suggestion would make troubleshooting or security worse?
- Switch all etcd communication to insecure HTTP for convenience.
- Test connectivity from the affected Pod before redesigning all Services.
- Apply scoped access rather than granting universal administration.
- Choose a storage access mode backed by real CSI capabilities.
Explanation
Correct Answer
A:Switch all etcd communication to insecure HTTP for convenience. etcd client requests must authenticate to the member using compatible TLS identities. A safer course is: Use the correct CA and client certificate/key matching the endpoint's advertised TLS configuration.
Incorrect Answers
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 the correct CA and client certificate/key matching the endpoint's advertised TLS configuration.
C:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Use the correct CA and client certificate/key matching the endpoint's advertised TLS configuration.
D: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: Use the correct CA and client certificate/key matching the endpoint's advertised TLS configuration.
Question 378
For this Kubernetes issue, select TWO statements that correctly pair a response with the evidence it should produce: An app container restarts so quickly that current kubectl logs show only its latest attempt.
- Validation: The preceding crash output reveals the failing command or config path.
- Remediation: Read the prior container instance logs using the --previous option.
- Validation: kubectl reaches the intended API endpoint without changing workloads.
- Remediation: Inspect alarms and backend size, compact and defragment safely as documented, and restore capacity.
- Remediation: Assume no earlier logs exist because the current log is empty.
Explanation
Correct Answers
A:Validation: The preceding crash output reveals the failing command or config path. This result verifies the behavior the remediation is supposed to restore.
B:Remediation: Read the prior container instance logs using the --previous option. The remedy targets the reported failure rather than a different subsystem. Current container output can omit the earlier process that caused CrashLoopBackOff.
Incorrect Answers
C: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: An app container restarts so quickly that current kubectl logs show only its latest attempt.
D:Remediation: Inspect alarms and backend size, compact and defragment safely as documented, and restore capacity. This action targets a different condition (etcd returns a no-space alarm after excessive database growth.), not this reported failure: An app container restarts so quickly that current kubectl logs show only its latest attempt.
E:Remediation: Assume no earlier logs exist because the current log is empty. This is the unsafe shortcut for the case, not an acceptable intervention. Current container output can omit the earlier process that caused CrashLoopBackOff.
Question 379
Select THREE technically appropriate statements spanning action, explanation and expected result for this case: A team has an etcd snapshot but no rehearsed recovery procedure.
- Remediation: Call the cluster protected solely because a file named snapshot exists.
- Remediation: Verify the intended cluster CA and regenerate a join command containing its correct discovery-token-ca-cert-hash.
- Validation: A recovered test control plane reads expected resources and the plan records measured recovery steps.
- Remediation: Perform an isolated restore rehearsal with documented credentials, manifest paths and validation checks.
- Validation: The operator processes the custom resource and reaches the expected reconciled status.
- Explanation: A backup without verified restoration cannot demonstrate recoverability.
Explanation
Correct Answers
C:Validation: A recovered test control plane reads expected resources and the plan records measured recovery steps. This result verifies the behavior the remediation is supposed to restore.
D:Remediation: Perform an isolated restore rehearsal with documented credentials, manifest paths and validation checks. The remedy targets the reported failure rather than a different subsystem. A backup without verified restoration cannot demonstrate recoverability.
F:Explanation: A backup without verified restoration cannot demonstrate recoverability. This is the technical mechanism supporting the recommended operation.
Incorrect Answers
A:Remediation: Call the cluster protected solely because a file named snapshot exists. This is the unsafe shortcut for the case, not an acceptable intervention. A backup without verified restoration cannot demonstrate recoverability.
B:Remediation: Verify the intended cluster CA and regenerate a join command containing its correct discovery-token-ca-cert-hash. This action targets a different condition (A worker join fails with a discovery CA certificate hash mismatch.), not this reported failure: A team has an etcd snapshot but no rehearsed recovery procedure.
E:Validation: The operator processes the custom resource and reaches the expected reconciled status. This evidence applies to a different condition (A custom resource exists but a controller is not reconciling its desired state.), and would not verify this target fix: A team has an etcd snapshot but no rehearsed recovery procedure.
Question 380
A CKA learner must investigate the following: A new storage integration must provision volumes without modifying kubelet core code. Which command or check supplies the MOST direct diagnostic evidence?
- Run kubectl auth can-i create deployments -n finance --as=team-user and inspect all relevant bindings.
- Inspect kubectl get csidrivers and CSI controller and node plugin Pods.
- Inspect installed CNI configuration and test runtime with crictl separately.
- Run kubectl describe pod in kube-system and check kubelet or container logs as appropriate.
Explanation
Correct Answer
B:Inspect kubectl get csidrivers and CSI controller and node plugin Pods. This diagnostic examines the relevant resource or subsystem. CSI decouples storage provider implementation from Kubernetes core. The validating result would be: CSI objects and drivers become registered and claims can be provisioned.
Incorrect Answers
A:This check is appropriate to the separate problem (An admin changed RoleBindings and wants proof the operator cannot create deployments.), but it is not the direct diagnostic for the described failure. Inspect kubectl get csidrivers and CSI controller and node plugin Pods.
C:This check is appropriate to the separate problem (A team mistakes the container network interface for the container runtime interface.), but it is not the direct diagnostic for the described failure. Inspect kubectl get csidrivers and CSI controller and node plugin Pods.
D: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. Inspect kubectl get csidrivers and CSI controller and node plugin Pods.