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 13

Question 120

A small retailer scales its Deployment but reports success from spec alone while new Pods are still Pending. Which implementation together with matching acceptance evidence best meets this case?

  1. Give each workload an appropriate Kubernetes ServiceAccount and narrow RBAC permissions rather than embedding an administrator kubeconfig in its image. Acceptance evidence: Run a synthetic read-only Pod with a restricted ServiceAccount and verify one permitted API read and one forbidden Secret list.
  2. 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.
  3. 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.
  4. Change a workload's declared replicas and observe controllers update actual Pod count, understanding that status may lag behind spec during reconciliation. Acceptance evidence: Set replicas from two to four, inspect generation and observed generation and watch readyReplicas converge.

Explanation

Correct Answer

D:

The situation is that a small retailer scales its Deployment but reports success from spec alone while new Pods are still Pending. Change a workload's declared replicas and observe controllers update actual Pod count, understanding that status may lag behind spec during reconciliation. Acceptance evidence: Set replicas from two to four, inspect generation and observed generation and watch readyReplicas converge. This pairing is justified because the API stores a desired spec while controllers asynchronously react to observations; status describes progress, not a guarantee of immediate convergence.

Incorrect Answers

A:

This action and check address the distinct objective “Differentiate ServiceAccounts from human kubeconfig identities” instead of the stated acceptance requirement. The matching action is to change a workload's declared replicas and observe controllers update actual Pod count, understanding that status may lag behind spec during reconciliation. Its confirming test is to set replicas from two to four, inspect generation and observed generation and watch readyReplicas converge.

B:

This action and check address the distinct objective “Use cordon and drain with disruption considerations for planned node maintenance” instead of the stated acceptance requirement. The matching action is to change a workload's declared replicas and observe controllers update actual Pod count, understanding that status may lag behind spec during reconciliation. Its confirming test is to set replicas from two to four, inspect generation and observed generation and watch readyReplicas converge.

C:

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 change a workload's declared replicas and observe controllers update actual Pod count, understanding that status may lag behind spec during reconciliation. Its confirming test is to set replicas from two to four, inspect generation and observed generation and watch readyReplicas converge.

Question 121

A hospital schedules application Pods with a team label and wants a Service to expose only the approved backend. Which Kubernetes or cloud-native implementation decision best solves the stated problem?

  1. Build an OCI-compatible image with immutable packaged artifacts and treat running container writable state as ephemeral.
  2. Use metrics for measurable trends, logs for event detail and distributed traces for individual transaction paths while sharing correlation identifiers.
  3. Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching.
  4. Choose a CRI-compatible container runtime on worker nodes and investigate image and container creation separately from API scheduling.

Explanation

Correct Answer

C:

Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. This resolves the issue because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships. To verify, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Incorrect Answers

A:

This option addresses the distinct objective “Distinguish a container image from a running container and its writable layer”, not the immediate requirement. An image contains layers and configuration; each container adds runtime state that can vanish on replacement unless data uses explicit persistent storage. For the stated case, Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

B:

This option addresses the distinct objective “Explain metrics, logs and traces as complementary observability signals”, not the immediate requirement. Each telemetry type represents a different view of runtime state and links through context can connect a symptom to a specific service hop. For the stated case, Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

D:

This option addresses the distinct objective “Explain the container runtime interface without conflating it with the control plane”, not the immediate requirement. A supported runtime such as containerd executes container operations requested through kubelet using the Container Runtime Interface. For the stated case, Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Question 122

A hospital schedules application Pods with a team label and wants a Service to expose only the approved backend. Which platform mechanism explains why the suitable approach works?

  1. Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.
  2. A NoSchedule taint repels Pods without a matching toleration; tolerance permits consideration but does not force placement on that node.
  3. ServiceAccounts provide workload identities for Kubernetes API access; human authentication and authorization are separately configured and should not be shared as static image secrets.
  4. kubectl logs retrieves container output and --previous can expose the prior terminated instance, but application output is not a substitute for cluster Events.

Explanation

Correct Answer

A:

Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships. It supports this action: Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. To confirm, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Incorrect Answers

B:

That statement explains the distinct objective “Understand taints and tolerations as repulsion controls” rather than the cause in this case. The deciding mechanism here is that Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

C:

That statement explains the distinct objective “Differentiate ServiceAccounts from human kubeconfig identities” rather than the cause in this case. The deciding mechanism here is that Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

D:

That statement explains the distinct objective “Use kubectl logs and previous container logs to isolate application crashes” rather than the cause in this case. The deciding mechanism here is that Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Question 123

A hospital schedules application Pods with a team label and wants a Service to expose only the approved backend. Which controlled observation would best validate the intended improvement?

  1. Inspect a failed Pod's last terminated reason and check whether an unintended command override prevented the server from starting.
  2. Delete one test Deployment-owned Pod and observe a replacement appear without a new Deployment definition.
  3. With synthetic users verify a trusted API connection, denied privilege escalation and appropriate audit entries for failed requests.
  4. Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Explanation

Correct Answer

D:

Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload. This is the relevant test because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Understand ENTRYPOINT and command overrides when a container exits immediately”, but not the required result. For this case, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

B:

This check would help evaluate the distinct objective “Identify reconciliation work performed by kube-controller-manager”, but not the required result. For this case, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

C:

This check would help evaluate the distinct objective “Protect API server access using authenticated TLS clients and audited authorization”, but not the required result. For this case, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Question 124

A hospital schedules application Pods with a team label and wants a Service to expose only the approved backend. An engineer proposes: “Name every Pod inventory but omit or mistype the Service's app selector, expecting name similarity to route traffic.” What adverse outcome would be most direct?

  1. The edit is invisible to the API and controller reconciliation, so subsequent node restarts or scheduling can discard it.
  2. Replacing a Pod can destroy state because no independent persistent volume was requested.
  3. A failed release can leave the service unavailable with no retained tested deployment revision.
  4. The Service receives no intended ready endpoints even when healthy Pods exist.

Explanation

Correct Answer

D:

The Service receives no intended ready endpoints even when healthy Pods exist. The shortcut creates this risk because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Incorrect Answers

A:

That outcome concerns the distinct objective “Trace Kubernetes API requests through the kube-apiserver entry point”; it is not the most direct consequence of this shortcut. The relevant consequence is that the Service receives no intended ready endpoints even when healthy Pods exist.

B:

That outcome concerns the distinct objective “Understand PersistentVolumeClaim binding to persistent storage resources”; it is not the most direct consequence of this shortcut. The relevant consequence is that the Service receives no intended ready endpoints even when healthy Pods exist.

C:

That outcome concerns the distinct objective “Use rollout status and undo to validate and recover a Deployment release”; it is not the most direct consequence of this shortcut. The relevant consequence is that the Service receives no intended ready endpoints even when healthy Pods exist.

Question 125

A hospital schedules application Pods with a team label and wants a Service to expose only the approved backend. What pair of supported action and practical verification should be approved?

  1. Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Acceptance evidence: Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.
  2. Keep a common base and targeted Kustomize overlays for namespace, image or replica differences across environments. Acceptance evidence: Run kubectl kustomize for development and production overlays and compare the resulting YAML objects before application.
  3. 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.
  4. Give each workload an appropriate Kubernetes ServiceAccount and narrow RBAC permissions rather than embedding an administrator kubeconfig in its image. Acceptance evidence: Run a synthetic read-only Pod with a restricted ServiceAccount and verify one permitted API read and one forbidden Secret list.

Explanation

Correct Answer

A:

Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Acceptance evidence: Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload. This pairing is justified because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Incorrect Answers

B:

This action and check address the distinct objective “Use Kustomize overlays to adapt manifests without copying whole deployments” instead of the stated acceptance requirement. The matching action is to apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Its confirming test is to compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

C:

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 apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Its confirming test is to compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

D:

This action and check address the distinct objective “Differentiate ServiceAccounts from human kubeconfig identities” instead of the stated acceptance requirement. The matching action is to apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Its confirming test is to compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Question 126

A campus project renames Pods but does not update labels referenced by its existing Service. What technical action should the platform team take in this situation?

  1. Use kubectl get for concise resource lists and kubectl describe for detailed status, conditions and Events when triaging a workload.
  2. Treat etcd as Kubernetes control-plane state storage and protect its snapshots, keys, and access separately from an application's database or PVC.
  3. Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching.
  4. Use OpenTelemetry SDKs and a collector to export appropriately sampled traces and metrics with stable service identities and trace context.

Explanation

Correct Answer

C:

The situation is that a campus project renames Pods but does not update labels referenced by its existing Service. Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. This resolves the issue because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships. To verify, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Incorrect Answers

A:

This option addresses the distinct objective “Use kubectl get and describe for distinct inspection needs”, not the immediate requirement. Get returns selected object information, while describe adds human-readable state and related Events helpful for initial diagnosis. For the stated case, Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

B:

This option addresses the distinct objective “Distinguish etcd persistence from running workload data”, not the immediate requirement. Etcd persists Kubernetes API objects and cluster configuration, while application records ordinarily live in workload-specific storage outside etcd. For the stated case, Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

D:

This option addresses the distinct objective “Instrument services with OpenTelemetry context propagation”, not the immediate requirement. Trace context allows spans from different services to join one transaction view, while collectors receive and forward telemetry without automatically storing all data. For the stated case, Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Question 127

A campus project renames Pods but does not update labels referenced by its existing Service. What underlying Kubernetes behavior is most relevant to this technical decision?

  1. kubectl logs retrieves container output and --previous can expose the prior terminated instance, but application output is not a substitute for cluster Events.
  2. Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.
  3. Authentication establishes who calls the API; RBAC authorization checks requested verb, resource and namespace before the API permits it.
  4. A supported runtime such as containerd executes container operations requested through kubelet using the Container Runtime Interface.

Explanation

Correct Answer

B:

The situation is that a campus project renames Pods but does not update labels referenced by its existing Service. Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships. It supports this action: Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. To confirm, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Incorrect Answers

A:

The situation is that a campus project renames Pods but does not update labels referenced by its existing Service. That statement explains the distinct objective “Use kubectl logs and previous container logs to isolate application crashes” rather than the cause in this case. The deciding mechanism here is that Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

C:

That statement explains the distinct objective “Use least-privilege kubectl authentication and authorization during routine administration” rather than the cause in this case. The deciding mechanism here is that Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

D:

That statement explains the distinct objective “Explain the container runtime interface without conflating it with the control plane” rather than the cause in this case. The deciding mechanism here is that Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Question 128

A campus project renames Pods but does not update labels referenced by its existing Service. What acceptance check most directly confirms this requirement is met?

  1. Set replicas from two to four, inspect generation and observed generation and watch readyReplicas converge.
  2. Deploy replicas with hostname anti-affinity and inspect their node placements in a cluster with enough eligible workers.
  3. Create a ClusterIP test Service and validate internal access, then compare the reachable endpoints under an authorized LoadBalancer configuration.
  4. Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Explanation

Correct Answer

D:

The situation is that a campus project renames Pods but does not update labels referenced by its existing Service. Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload. This is the relevant test because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Explain desired state versus observed status in Kubernetes objects”, but not the required result. For this case, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

B:

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, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

C:

This check would help evaluate the distinct objective “Choose ClusterIP, NodePort and LoadBalancer Service types for appropriate reachability”, but not the required result. For this case, compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Question 129

A campus project renames Pods but does not update labels referenced by its existing Service. The team suggests: “Name every Pod inventory but omit or mistype the Service's app selector, expecting name similarity to route traffic.” Which failure should the reviewer anticipate?

  1. Sensitive workloads may remain reachable until actual identity and traffic controls are installed.
  2. The emergency fix disappears when the Pod is replaced and cannot be reproduced reliably.
  3. The Service receives no intended ready endpoints even when healthy Pods exist.
  4. Packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.

Explanation

Correct Answer

C:

The situation is that a campus project renames Pods but does not update labels referenced by its existing Service. The Service receives no intended ready endpoints even when healthy Pods exist. The shortcut creates this risk because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Incorrect Answers

A:

That outcome concerns the distinct objective “Use namespaces as organizational scopes without treating them as firewalls”; it is not the most direct consequence of this shortcut. The relevant consequence is that the Service receives no intended ready endpoints even when healthy Pods exist.

B:

That outcome concerns the distinct objective “Apply resource manifests declaratively instead of depending on imperative drift”; it is not the most direct consequence of this shortcut. The relevant consequence is that the Service receives no intended ready endpoints even when healthy Pods exist.

D:

That outcome concerns the distinct objective “Understand ports, targetPort and protocol mapping in a Service”; it is not the most direct consequence of this shortcut. The relevant consequence is that the Service receives no intended ready endpoints even when healthy Pods exist.

Question 130

A campus project renames Pods but does not update labels referenced by its existing Service. Which engineering change and test jointly addresses the scenario?

  1. 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.
  2. Give clients a Service DNS name rather than hardcoding Pod IP addresses that can change when replicas are replaced. Acceptance evidence: Delete and replace a Deployment Pod and verify a client continues to reach its Service DNS name despite changed backend Pod addresses.
  3. Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Acceptance evidence: Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.
  4. Use a Deployment for a replicated stateless application requiring rolling updates and replacement of failed Pods. Acceptance evidence: Scale a test Deployment and inspect its ReplicaSet and owned Pods, then compare deleting a standalone Pod.

Explanation

Correct Answer

C:

The situation is that a campus project renames Pods but does not update labels referenced by its existing Service. Apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Acceptance evidence: Compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload. This pairing is justified because Kubernetes labels are queryable object metadata, while selectors connect controllers and Services to matching endpoints; names alone do not create these relationships.

Incorrect Answers

A:

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 apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Its confirming test is to compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

B:

This action and check address the distinct objective “Distinguish Pod IPs from stable Services during rescheduling” instead of the stated acceptance requirement. The matching action is to apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Its confirming test is to compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

D:

This action and check address the distinct objective “Distinguish Deployment desired state from a manually created Pod” instead of the stated acceptance requirement. The matching action is to apply stable application labels and ensure Services and controllers select the intended Pods by equality or set-based matching. Its confirming test is to compare kubectl get pods -l app=inventory with Service selectors and EndpointSlices for a test workload.

Kubernetes and Cloud Native Associate (KCNA) Practice Tests