CNCF CKA Practice Test 40
Question 390
A review finds this Kubernetes issue: An app writes errors to stderr but a team searches only a file in the container image. Which suggestion would make troubleshooting or security worse?
- Check applicable component version compatibility before upgrading.
- Keep backups or change history for potentially destructive maintenance.
- Verify the target cluster and namespace before mutating resources.
- Change CNI settings to restore an application error log file.
Explanation
Correct Answer
D:Change CNI settings to restore an application error log file. Kubernetes container log viewing relies on container output streams, not arbitrary files. A safer course is: Inspect aggregated container stdout/stderr using kubectl logs or the configured logging pipeline.
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: Inspect aggregated container stdout/stderr using kubectl logs or the configured logging pipeline.
B: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: Inspect aggregated container stdout/stderr using kubectl logs or the configured logging pipeline.
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: Inspect aggregated container stdout/stderr using kubectl logs or the configured logging pipeline.
Question 391
Following this Kubernetes scenario, an operator validates remediation: A monitoring integration needs cluster-wide read-only node information. Which measurable outcome shows success?
- A permitted node read succeeds and a node mutation is forbidden.
- Rendered manifests share the base while environment-specific patches differ as intended.
- Health checks succeed without skipping TLS verification.
- The new node trusts and joins the expected API server without accepting an arbitrary endpoint.
Explanation
Correct Answer
A:A permitted node read succeeds and a node mutation is forbidden. The corresponding action is: Bind an appropriate limited ClusterRole to its ServiceAccount rather than writing namespaced Roles.
Incorrect Answers
B:Rendered manifests share the base while environment-specific patches differ as intended. This is evidence for a separate case (Two clusters need the same base manifest but different replica counts and labels.), not for the target problem. An appropriate validation would be: A permitted node read succeeds and a node mutation is forbidden.
C:Health checks succeed without skipping TLS verification. This is evidence for a separate case (etcdctl endpoint health fails on a local stacked-etcd member with a TLS handshake error.), not for the target problem. An appropriate validation would be: A permitted node read succeeds and a node mutation is forbidden.
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: A permitted node read succeeds and a node mutation is forbidden.
Question 392
An administrator reviews several possible responses to this condition: Traffic to /api is routed to the frontend Service rather than the API backend. Which option creates an avoidable failure?
- Use a wildcard host to fix a mismatched backend Service reference.
- Verify the target cluster and namespace before mutating resources.
- Confirm actual node conditions and allocatable resources before scheduling changes.
- Choose a storage access mode backed by real CSI capabilities.
Explanation
Correct Answer
A:Use a wildcard host to fix a mismatched backend Service reference. Ingress path routing depends on explicit path rules and controller semantics. A safer course is: Correct Ingress paths and pathType mapping to the proper Service backends.
Incorrect Answers
B: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: Correct Ingress paths and pathType mapping to the proper Service backends.
C: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: Correct Ingress paths and pathType mapping to the proper Service backends.
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: Correct Ingress paths and pathType mapping to the proper Service backends.
Question 393
During remediation, this failure appears: An app cannot reach a database and the error is a TCP timeout, not DNS NXDOMAIN. Which action is the LEAST defensible?
- Confirm actual node conditions and allocatable resources before scheduling changes.
- Apply scoped access rather than granting universal administration.
- Immediately edit CoreDNS although the target DNS name resolves correctly.
- Inspect Pod and component events before changing unrelated resources.
Explanation
Correct Answer
C:Immediately edit CoreDNS although the target DNS name resolves correctly. DNS, network path and application listener failures require different diagnostics. A safer course is: Test name resolution, then TCP reachability, policies and listening port stepwise.
Incorrect Answers
A: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: Test name resolution, then TCP reachability, policies and listening port stepwise.
B:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Test name resolution, then TCP reachability, policies and listening port stepwise.
D: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: Test name resolution, then TCP reachability, policies and listening port stepwise.
Question 394
An engineer needs to justify a change for this issue: A worker join fails with a discovery CA certificate hash mismatch. Which technical reason is MOST relevant?
- The CA pin guards bootstrap against connecting to an unintended cluster.
- Kubelet must not be newer than its kube-apiserver under normal supported skew rules.
- A backup without verified restoration cannot demonstrate recoverability.
- Kustomize composes declarative resources without requiring separate duplicated manifests.
Explanation
Correct Answer
A:The CA pin guards bootstrap against connecting to an unintended cluster. This principle explains the targeted result. A concrete response is: Verify the intended cluster CA and regenerate a join command containing its correct discovery-token-ca-cert-hash.
Incorrect Answers
B:This principle is useful for another case (A proposed upgrade would run kubelet newer than kube-apiserver.), but does not explain the most direct solution here. The CA pin guards bootstrap against connecting to an unintended cluster.
C:A backup without verified restoration cannot demonstrate recoverability. This principle is useful for another case (A team has an etcd snapshot but no rehearsed recovery procedure.), but does not explain the most direct solution here. The governing consideration is: The CA pin guards bootstrap against connecting to an unintended cluster.
D:This principle is useful for another case (Two clusters need the same base manifest but different replica counts and labels.), but does not explain the most direct solution here. The CA pin guards bootstrap against connecting to an unintended cluster.
Question 395
An administrator is investigating this situation: A controller ServiceAccount needs to read ConfigMaps only in team-a. Which action BEST resolves the underlying issue?
- Bind a narrowly scoped Role to the controller ServiceAccount in team-a.
- Use a Role limited to the required verbs and resourceNames for the named ConfigMap.
- Adopt a version-controlled kubeadm configuration document with supported API schema and pinned intended settings.
- Inspect certificate expirations and plan safe renewal with component restart and verification as necessary.
Explanation
Correct Answer
A:Bind a narrowly scoped Role to the controller ServiceAccount in team-a. This correction targets the specific failure. ServiceAccount identity does not automatically confer application-specific API permissions. A successful result is: The controller can get its intended ConfigMaps but cannot modify Secrets or read other namespaces.
Incorrect Answers
B:Use a Role limited to the required verbs and resourceNames for the named ConfigMap.
C:Adopt a version-controlled kubeadm configuration document with supported API schema and pinned intended settings. This procedure belongs to a different Kubernetes condition (A cluster bootstrap script contains changing flags and has become difficult to audit.). It does not directly resolve the observed failure. The targeted action is: Bind a narrowly scoped Role to the controller ServiceAccount in team-a.
D:This procedure belongs to a different Kubernetes condition (An API client certificate is about to expire on a kubeadm managed control plane.).
Question 396
An administrator reviews several possible responses to this condition: Service ClusterIP connections fail on one node even though direct Pod IP connections work. Which option creates an avoidable failure?
- Record a rollback approach before high-impact control-plane changes.
- Use a staged rollout and observe readiness before full deployment.
- Inspect Pod and component events before changing unrelated resources.
- Restart every application container as the first action to fix kube-proxy.
Explanation
Correct Answer
D:Restart every application container as the first action to fix kube-proxy. Service routing depends on node dataplane health distinct from Pod connectivity. A safer course is: Inspect kube-proxy or the installed replacement dataplane on the affected node.
Incorrect Answers
A:Record a rollback approach before high-impact control-plane changes. Deliberate rollback improves operational recoverability. For the stated case, a focused correction is: Inspect kube-proxy or the installed replacement dataplane on the affected node.
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: Inspect kube-proxy or the installed replacement dataplane on the affected node.
C: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: Inspect kube-proxy or the installed replacement dataplane on the affected node.
Question 397
An operations team tests its response to this finding: A kubectl command is applying objects in the wrong environment after a context switch. Which outcome most clearly establishes that the fix worked?
- CSI objects and drivers become registered and claims can be provisioned.
- kubectl commands target the authorized cluster and expected namespace.
- A permitted node read succeeds and a node mutation is forbidden.
- The worker joins the intended cluster and its node appears without relaxing certificate trust.
Explanation
Correct Answer
B:Kubectl commands target the authorized cluster and expected namespace. The corresponding action is: Inspect available kubeconfig contexts and explicitly select or specify the intended context.
Incorrect Answers
A:CSI objects and drivers become registered and claims can be provisioned. This is evidence for a separate case (A new storage integration must provision volumes without modifying kubelet core code.), not for the target problem. An appropriate validation would be: kubectl commands target the authorized cluster and expected namespace.
C:A permitted node read succeeds and a node mutation is forbidden. This is evidence for a separate case (A monitoring integration needs cluster-wide read-only node information.), not for the target problem. An appropriate validation would be: kubectl commands target the authorized cluster and expected namespace.
D:The worker joins the intended cluster and its node appears without relaxing certificate trust. This is evidence for a separate case (A new worker cannot join because its bootstrap token has expired.), not for the target problem. An appropriate validation would be: kubectl commands target the authorized cluster and expected namespace.
Question 398
During an operational review, this fact emerges: The control plane is upgraded but one worker still runs an older supported kubelet. Which Kubernetes behavior MOST directly governs the result?
- Consensus systems require quorum; uncontrolled member recreation risks state loss.
- Worker component upgrades follow control-plane upgrades and require deliberate node handling.
- kubectl uses current-context, user and cluster mappings that must be validated.
- kubeadm join uses bootstrap discovery and credentials that can expire.
Explanation
Correct Answer
B:Worker component upgrades follow control-plane upgrades and require deliberate node handling. This principle explains the targeted result. A concrete response is: Drain the worker, upgrade kubeadm and kubelet components appropriately, then uncordon after validation.
Incorrect Answers
A: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. Worker component upgrades follow control-plane upgrades and require deliberate node handling.
C:This principle is useful for another case (A kubectl command is applying objects in the wrong environment after a context switch.), but does not explain the most direct solution here. Worker component upgrades follow control-plane upgrades and require deliberate node handling.
D:This principle is useful for another case (A new worker cannot join because its bootstrap token has expired.), but does not explain the most direct solution here.
Question 399
The team is reviewing this failure mode: A batch import must succeed once and then stop rather than keep restarting forever. Which statement explains WHY the recommended control works?
- Readiness probes gate traffic eligibility, not whether the container process exists.
- Jobs manage finite tasks with completion semantics.
- RollingUpdate availability and surge settings govern the rate of replica replacement.
- Node selection constrains placement to labeled eligible machines.
Explanation
Correct Answer
B:Jobs manage finite tasks with completion semantics. This principle explains the targeted result. A concrete response is: Use a Job with restart and backoff settings appropriate for finite completion.
Incorrect Answers
A:Readiness probes gate traffic eligibility, not whether the container process exists. This principle is useful for another case (A container is running but cannot serve requests until a cache is primed.), but does not explain the most direct solution here. The governing consideration is: Jobs manage finite tasks with completion semantics.
C:RollingUpdate availability and surge settings govern the rate of replica replacement. This principle is useful for another case (A Deployment must update without taking all replicas offline during rollout.), but does not explain the most direct solution here. The governing consideration is: Jobs manage finite tasks with completion semantics.
D:Node selection constrains placement to labeled eligible machines. This principle is useful for another case (A GPU workload was scheduled on a node without GPU hardware.), but does not explain the most direct solution here. The governing consideration is: Jobs manage finite tasks with completion semantics.
Question 400
During cluster maintenance, an engineer finds this problem: Two API servers run but workloads use one control-plane node IP as the endpoint. Which next action is technically justified?
- Inspect release history and roll back to the last healthy chart revision.
- Use the correct CA and client certificate/key matching the endpoint's advertised TLS configuration.
- Configure a stable shared controlPlaneEndpoint behind a correctly configured API server load balancer.
- Take an authenticated etcdctl snapshot with correct endpoints and required TLS credentials.
Explanation
Correct Answer
C:Configure a stable shared controlPlaneEndpoint behind a correctly configured API server load balancer. This correction targets the specific failure. A highly available control plane needs a stable reachable API endpoint. A successful result is: kubectl and joining nodes remain able to reach the API when one control-plane node fails.
Incorrect Answers
A:Inspect release history and roll back to the last healthy chart revision. This procedure belongs to a different Kubernetes condition (A Helm upgrade caused a regression in a cluster add-on.). It does not directly resolve the observed failure. The targeted action is: Configure a stable shared controlPlaneEndpoint behind a correctly configured API server load balancer.
B:Use the correct CA and client certificate/key matching the endpoint's advertised TLS configuration.
D:Take an authenticated etcdctl snapshot with correct endpoints and required TLS credentials. This procedure belongs to a different Kubernetes condition (A stacked-etcd control plane needs a recoverable snapshot before upgrade.). It does not directly resolve the observed failure. The targeted action is: Configure a stable shared controlPlaneEndpoint behind a correctly configured API server load balancer.