Practice Exams:

Linux Foundation KCNA Dumps

EXAM: Kubernetes and Cloud Native Associate
Verified By Experts
Premium Bundle
$40.00
$59.97 $99.97

KCNA Premium Bundle


  • Premium File 333 Questions & Answers
  • Training Course 54 Lectures
  • Study Guide 410 Pages

Linux Foundation KCNA Practice Test 32

Question 310

A training cluster operator must drain one node while several DaemonSet and StatefulSet Pods exist. What pair of supported action and practical verification should be approved?

  1. Run a logging or node monitoring agent as a DaemonSet when every eligible worker needs its own instance. Acceptance evidence: Add a test worker node and inspect the corresponding DaemonSet agent Pod without scaling a Deployment.
  2. Use the scheduler's node-binding decision to explain initial Pod placement, then inspect the chosen node's kubelet for local container lifecycle status. Acceptance evidence: Inspect a new Pod's nodeName and Events, then compare scheduling events with kubelet-reported container status.
  3. Cordon a worker to prevent new scheduling and drain safely under PodDisruptionBudgets and DaemonSet rules before maintenance. Acceptance evidence: Observe a controlled drain with replica owners and a PDB, then verify workloads move and uncordon restores eligibility.
  4. Require approved image registries, signature or digest verification and patch ownership when admitting production container images. Acceptance evidence: Deploy one signed approved image and one unverified synthetic image under a test admission policy, recording expected allow and deny results.

Explanation

Correct Answer

C:

The situation is that a training cluster operator must drain one node while several DaemonSet and StatefulSet Pods exist. Cordon a worker to prevent new scheduling and drain safely under PodDisruptionBudgets and DaemonSet rules before maintenance. Acceptance evidence: Observe a controlled drain with replica owners and a PDB, then verify workloads move and uncordon restores eligibility. This pairing is justified because cordon marks a node unschedulable for new ordinary Pods; drain evicts managed workloads when policies and availability permit.

Incorrect Answers

A:

This action and check address the distinct objective “Select DaemonSet for node-local agents rather than Deployment replica counts” instead of the stated acceptance requirement. The matching action is to cordon a worker to prevent new scheduling and drain safely under PodDisruptionBudgets and DaemonSet rules before maintenance. Its confirming test is to observe a controlled drain with replica owners and a PDB, then verify workloads move and uncordon restores eligibility.

B:

This action and check address the distinct objective “Separate kube-scheduler decisions from kubelet execution” instead of the stated acceptance requirement. The matching action is to cordon a worker to prevent new scheduling and drain safely under PodDisruptionBudgets and DaemonSet rules before maintenance. Its confirming test is to observe a controlled drain with replica owners and a PDB, then verify workloads move and uncordon restores eligibility.

D:

This action and check address the distinct objective “Use image provenance and policy controls without trusting mutable tags” instead of the stated acceptance requirement. The matching action is to cordon a worker to prevent new scheduling and drain safely under PodDisruptionBudgets and DaemonSet rules before maintenance. Its confirming test is to observe a controlled drain with replica owners and a PDB, then verify workloads move and uncordon restores eligibility.

Question 311

A payments API should not place every copy in one availability zone. Which supported Kubernetes practice directly addresses the stated requirement?

  1. Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones.
  2. Identify whether the cluster uses kube-proxy or an alternative Service dataplane before diagnosing virtual Service IP forwarding behavior.
  3. Configure an HPA for an eligible scalable controller using available resource or custom metrics and sensible minimum/maximum replicas.
  4. Run a logging or node monitoring agent as a DaemonSet when every eligible worker needs its own instance.

Explanation

Correct Answer

A:

Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. This resolves the issue because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable. To verify, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Incorrect Answers

B:

This option addresses the distinct objective “Understand service proxy implementations without assuming kube-proxy is mandatory”, not the immediate requirement. Kube-proxy can maintain node networking rules for Services, but supported network implementations may replace this function. For the stated case, topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

C:

This option addresses the distinct objective “Use HorizontalPodAutoscaler metrics rather than ad hoc instance scripts”, not the immediate requirement. HPA adjusts desired replica count based on observed metric targets; it needs a functioning metrics source and cannot add missing node capacity itself. For the stated case, topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

D:

This option addresses the distinct objective “Select DaemonSet for node-local agents rather than Deployment replica counts”, not the immediate requirement. A DaemonSet controller targets eligible nodes for a Pod each, adapting to node additions and labels rather than maintaining a global arbitrary replica count. For the stated case, topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Question 312

A payments API should not place every copy in one availability zone. Which causal explanation supports the intended design choice?

  1. Linux namespaces affect visibility and isolation boundaries, while cgroups organize and limit resource usage; neither automatically supplies a full virtual machine.
  2. Different Kubernetes components emit distinct Events; identifying the stage prevents changing unrelated network or application settings.
  3. Topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.
  4. A DaemonSet controller targets eligible nodes for a Pod each, adapting to node additions and labels rather than maintaining a global arbitrary replica count.

Explanation

Correct Answer

C:

Topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable. It supports this action: Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. To confirm, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Incorrect Answers

A:

That statement explains the distinct objective “Explain Linux namespaces and cgroups as distinct container isolation mechanisms” rather than the cause in this case. The deciding mechanism here is that topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

B:

That statement explains the distinct objective “Use describe and Events to distinguish admission, scheduling and execution errors” rather than the cause in this case. The deciding mechanism here is that topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

D:

That statement explains the distinct objective “Select DaemonSet for node-local agents rather than Deployment replica counts” rather than the cause in this case. The deciding mechanism here is that topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Question 313

A payments API should not place every copy in one availability zone. Which test provides the strongest evidence of a correct implementation?

  1. Deploy replicas with hostname anti-affinity and inspect their node placements in a cluster with enough eligible workers.
  2. Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.
  3. Inspect a new Pod's nodeName and Events, then compare scheduling events with kubelet-reported container status.
  4. Deploy a controlled defective revision, record error rate before and after rollout and verify rollback restores the prior behavior.

Explanation

Correct Answer

B:

Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod. This is the relevant test because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Use Pod anti-affinity to reduce correlated replica failure”, but not the required result. For this case, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

C:

This check would help evaluate the distinct objective “Separate kube-scheduler decisions from kubelet execution”, but not the required result. For this case, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

D:

This check would help evaluate the distinct objective “Correlate application rollout revisions with error spikes”, but not the required result. For this case, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Question 314

A payments API should not place every copy in one availability zone. A shortcut is proposed: “Set maxSkew without checking matching labels and assume it automatically distributes every workload in the cluster.” Which technical consequence follows most closely?

  1. Users may encounter failed requests because readiness and application-level health remain unverified.
  2. A backend exception can remain hidden even when CPU load looks normal.
  3. The scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.
  4. The planned maintenance causes avoidable downtime because no safe application replica remains available.

Explanation

Correct Answer

C:

The scheduler may evaluate an unintended Pod group or fail to spread the intended replicas. The shortcut creates this risk because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Incorrect Answers

A:

That outcome concerns the distinct objective “Use kubectl get and describe for distinct inspection needs”; it is not the most direct consequence of this shortcut. The relevant consequence is that the scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.

B:

That outcome concerns the distinct objective “Explain metrics, logs and traces as complementary observability signals”; it is not the most direct consequence of this shortcut. The relevant consequence is that the scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.

D:

That outcome concerns the distinct objective “Use cordon and drain with disruption considerations for planned node maintenance”; it is not the most direct consequence of this shortcut. The relevant consequence is that the scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.

Question 315

A payments API should not place every copy in one availability zone. Which combined solution and independent check are most directly justified?

  1. Check DNS lookup, EndpointSlice population, Pod readiness and actual process port in a deliberate sequence before modifying traffic routing. Acceptance evidence: Test a staged Service with a mismatched selector and separately a healthy endpoint with the wrong targetPort to compare symptoms.
  2. Configure anti-affinity against other Pods with a specific label so replicas prefer or require separate failure domains as appropriate. Acceptance evidence: Deploy replicas with hostname anti-affinity and inspect their node placements in a cluster with enough eligible workers.
  3. Set realistic CPU and memory requests for Pods and investigate FailedScheduling when no node has sufficient allocatable resources. Acceptance evidence: Set an intentionally excessive memory request in a lab and inspect Pod Pending Events before adjusting it.
  4. Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Acceptance evidence: Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Explanation

Correct Answer

D:

Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Acceptance evidence: Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod. This pairing is justified because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Incorrect Answers

A:

This action and check address the distinct objective “Distinguish a failed Service selector from broken DNS or a failing backend” instead of the stated acceptance requirement. The matching action is to define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Its confirming test is to deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

B:

This action and check address the distinct objective “Use Pod anti-affinity to reduce correlated replica failure” instead of the stated acceptance requirement. The matching action is to define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Its confirming test is to deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

C:

This action and check address the distinct objective “Use container resource requests to help the scheduler fit Pods on nodes” instead of the stated acceptance requirement. The matching action is to define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Its confirming test is to deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Question 316

A public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. What technical action should the platform team take in this situation?

  1. Cordon a worker to prevent new scheduling and drain safely under PodDisruptionBudgets and DaemonSet rules before maintenance.
  2. Read current logs and --previous logs for the failing container and correlate timestamps with Pod restart counts before altering workloads.
  3. Use emptyDir for temporary sharing between containers within a Pod, and PVC-backed storage when data must survive Pod replacement.
  4. Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones.

Explanation

Correct Answer

D:

The situation is that a public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. This resolves the issue because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable. To verify, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Incorrect Answers

A:

This option addresses the distinct objective “Use cordon and drain with disruption considerations for planned node maintenance”, not the immediate requirement. Cordon marks a node unschedulable for new ordinary Pods; drain evicts managed workloads when policies and availability permit. For the stated case, topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

B:

This option addresses the distinct objective “Use kubectl logs and previous container logs to isolate application crashes”, not the immediate requirement. Kubectl logs retrieves container output and --previous can expose the prior terminated instance, but application output is not a substitute for cluster Events. For the stated case, topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

C:

This option addresses the distinct objective “Understand emptyDir as Pod-lifetime shared storage, not durable application persistence”, not the immediate requirement. EmptyDir is initialized for a Pod and its contents can be shared among containers but do not survive the Pod's removal. For the stated case, topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Question 317

A public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. What underlying Kubernetes behavior is most relevant to this technical decision?

  1. A required affinity expression blocks scheduling onto nonmatching nodes; a preferred expression influences scoring but permits fallback when necessary.
  2. CoreDNS watches Service objects and serves cluster-aware names; bare names normally resolve relative to the requesting Pod's namespace and search domains.
  3. The scheduler selects a suitable node for an unscheduled Pod; kubelet on that node uses the runtime to start and monitor containers.
  4. Topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Explanation

Correct Answer

D:

The situation is that a public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. Topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable. It supports this action: Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. To confirm, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Incorrect Answers

A:

That statement explains the distinct objective “Distinguish preferred node affinity from required scheduling rules” rather than the cause in this case. The deciding mechanism here is that topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

B:

That statement explains the distinct objective “Verify CoreDNS resolution and namespace-qualified Service names” rather than the cause in this case. The deciding mechanism here is that topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

C:

That statement explains the distinct objective “Separate kube-scheduler decisions from kubelet execution” rather than the cause in this case. The deciding mechanism here is that topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Question 318

A public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. What acceptance check most directly confirms this requirement is met?

  1. Run kubectl config current-context and kubectl config view --minify, then perform a read-only lookup in the expected namespace.
  2. Delete and replace a Deployment Pod and verify a client continues to reach its Service DNS name despite changed backend Pod addresses.
  3. Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.
  4. Deploy replicas with hostname anti-affinity and inspect their node placements in a cluster with enough eligible workers.

Explanation

Correct Answer

C:

The situation is that a public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod. This is the relevant test because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Manage kubectl contexts to avoid changes in the wrong cluster”, but not the required result. For this case, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

B:

This check would help evaluate the distinct objective “Distinguish Pod IPs from stable Services during rescheduling”, but not the required result. For this case, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

D:

The situation is that a public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. This check would help evaluate the distinct objective “Use Pod anti-affinity to reduce correlated replica failure”, but not the required result. For this case, deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Question 319

A public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. The team suggests: “Set maxSkew without checking matching labels and assume it automatically distributes every workload in the cluster.” Which failure should the reviewer anticipate?

  1. The scheduler could place multiple replicas together, leaving a node without the intended local collector.
  2. Cross-namespace calls can fail or resolve a same-named but unrelated local Service.
  3. Independent rollout, scaling and failure isolation become difficult because the services are coupled to one scheduling unit.
  4. The scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.

Explanation

Correct Answer

D:

The situation is that a public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. The scheduler may evaluate an unintended Pod group or fail to spread the intended replicas. The shortcut creates this risk because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Incorrect Answers

A:

That outcome concerns the distinct objective “Select DaemonSet for node-local agents rather than Deployment replica counts”; it is not the most direct consequence of this shortcut. The relevant consequence is that the scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.

B:

That outcome concerns the distinct objective “Verify CoreDNS resolution and namespace-qualified Service names”; it is not the most direct consequence of this shortcut. The relevant consequence is that the scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.

C:

That outcome concerns the distinct objective “Use Pods as the shared network and storage execution unit”; it is not the most direct consequence of this shortcut. The relevant consequence is that the scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.

Question 320

A public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. Which engineering change and test jointly addresses the scenario?

  1. Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Acceptance evidence: Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.
  2. Group tightly coupled containers that require the same Pod networking identity and optionally shared volumes into one Pod while keeping independently scalable services separate. Acceptance evidence: Deploy a test sidecar and main container, verify localhost communication and compare their shared Pod IP with a separate Pod.
  3. Run a logging or node monitoring agent as a DaemonSet when every eligible worker needs its own instance. Acceptance evidence: Add a test worker node and inspect the corresponding DaemonSet agent Pod without scaling a Deployment.
  4. Review Retain versus Delete behavior for data-bearing PVs and test cleanup policy using synthetic non-sensitive data. Acceptance evidence: Create a disposable PVC with test content, delete its consuming Pod and then the claim, observing actual PV and backing volume behavior.

Explanation

Correct Answer

A:

The situation is that a public service team sees uneven replica counts after scaling and wants a defined scheduler spreading policy. Define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Acceptance evidence: Deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod. This pairing is justified because topology spread constraints compare Pod distribution in topology domains and can restrict or prefer placement depending on whenUnsatisfiable.

Incorrect Answers

B:

This action and check address the distinct objective “Use Pods as the shared network and storage execution unit” instead of the stated acceptance requirement. The matching action is to define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Its confirming test is to deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

C:

This action and check address the distinct objective “Select DaemonSet for node-local agents rather than Deployment replica counts” instead of the stated acceptance requirement. The matching action is to define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Its confirming test is to deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

D:

This action and check address the distinct objective “Compare PV reclaim policies and explain data retention on PVC deletion” instead of the stated acceptance requirement. The matching action is to define meaningful topology keys, matching label selectors and skew limits when balancing eligible replicas across nodes or zones. Its confirming test is to deploy a matching replica set across two labeled zones and inspect skew after adding a new Pod.

Kubernetes and Cloud Native Associate (KCNA) Practice Tests