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 52

Question 510

A retail order processor caches a Pod IP and loses connectivity after cluster maintenance. Which implementation together with matching acceptance evidence best meets this case?

  1. Choose an available StorageClass with a compatible CSI provisioner and appropriate binding behavior when creating a PVC. Acceptance evidence: Create a claim using a named test StorageClass and compare provisioner events and binding timing with a non-existent class.
  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. Follow a project's published governance, issue templates, contributor guides and code of conduct when reporting bugs or proposing changes. Acceptance evidence: Submit a reproducible synthetic issue and examine how maintainers triage, review and test a proposed patch before release.
  4. Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Acceptance evidence: Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Explanation

Correct Answer

B:

The situation is that a retail order processor caches a Pod IP and loses connectivity after cluster maintenance. 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. This pairing is justified because pods receive network identities that can be ephemeral, while a Service maintains a stable discovery and traffic abstraction over selected endpoints.

Incorrect Answers

A:

This action and check address the distinct objective “Use StorageClass for dynamic volume provisioning rather than handcrafting every disk” instead of the stated acceptance requirement. The matching action is to give clients a Service DNS name rather than hardcoding Pod IP addresses that can change when replicas are replaced. Its confirming test is to delete and replace a Deployment Pod and verify a client continues to reach its Service DNS name despite changed backend Pod addresses.

C:

This action and check address the distinct objective “Use open community governance and contribution processes for sustainable cloud-native projects” instead of the stated acceptance requirement. The matching action is to give clients a Service DNS name rather than hardcoding Pod IP addresses that can change when replicas are replaced. Its confirming test is to delete and replace a Deployment Pod and verify a client continues to reach its Service DNS name despite changed backend Pod addresses.

D:

This action and check address the distinct objective “Understand ports, targetPort and protocol mapping in a Service” instead of the stated acceptance requirement. The matching action is to give clients a Service DNS name rather than hardcoding Pod IP addresses that can change when replicas are replaced. Its confirming test is to delete and replace a Deployment Pod and verify a client continues to reach its Service DNS name despite changed backend Pod addresses.

Question 511

An inventory service listens on port 8080 but clients call its Service on port 80. Which Kubernetes or cloud-native implementation decision best solves the stated problem?

  1. Apply ingress and egress NetworkPolicy to selected Pods and verify both permitted and denied synthetic flows under a network plugin that implements policy.
  2. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace.
  3. Keep desired workload YAML in version control and use kubectl apply to reconcile supported object fields through the API.
  4. Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used.

Explanation

Correct Answer

D:

Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. This resolves the issue because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors. To verify, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Incorrect Answers

A:

This option addresses the distinct objective “Recognize NetworkPolicy isolation only when the CNI enforces it”, not the immediate requirement. NetworkPolicy declares traffic restrictions, but Kubernetes itself does not provide enforcement when the installed CNI lacks NetworkPolicy support. For the stated case, a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

B:

This option addresses the distinct objective “Implement namespaced RBAC Roles for least-privilege resource permissions”, not the immediate requirement. RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate. For the stated case, a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

C:

This option addresses the distinct objective “Apply resource manifests declaratively instead of depending on imperative drift”, not the immediate requirement. Declarative apply records desired configuration and supports repeatable reviewed changes; ad hoc editing of running containers is not persistent configuration management. For the stated case, a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Question 512

An inventory service listens on port 8080 but clients call its Service on port 80. Which platform mechanism explains why the suitable approach works?

  1. CoreDNS watches Service objects and serves cluster-aware names; bare names normally resolve relative to the requesting Pod's namespace and search domains.
  2. A Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.
  3. Pod Security Standards establish common workload hardening profiles, and admission checks can enforce restricted capabilities and privilege use at API creation.
  4. The scheduler evaluates requests against node allocatable capacity; limits govern runtime ceilings and do not substitute for scheduling requests.

Explanation

Correct Answer

B:

A Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors. It supports this action: Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. To confirm, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Incorrect Answers

A:

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 a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

C:

That statement explains the distinct objective “Use Pod Security Standards to deny overly privileged Pod configurations” rather than the cause in this case. The deciding mechanism here is that a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

D:

That statement explains the distinct objective “Use container resource requests to help the scheduler fit Pods on nodes” rather than the cause in this case. The deciding mechanism here is that a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Question 513

An inventory service listens on port 8080 but clients call its Service on port 80. Which controlled observation would best validate the intended improvement?

  1. Attempt to create a privileged test Pod in a restricted namespace and inspect the admission rejection message.
  2. Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.
  3. Check CNI capabilities, establish a default-deny test policy and verify one allowed and one denied connection.
  4. Resolve an approved image digest, deploy that reference in staging and verify the same digest exists in the production Pod spec.

Explanation

Correct Answer

B:

Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings. This is the relevant test because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Use Pod Security Standards to deny overly privileged Pod configurations”, but not the required result. For this case, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

C:

This check would help evaluate the distinct objective “Recognize NetworkPolicy isolation only when the CNI enforces it”, but not the required result. For this case, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

D:

This check would help evaluate the distinct objective “Use an immutable image digest for exact deployment provenance”, but not the required result. For this case, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Question 514

An inventory service listens on port 8080 but clients call its Service on port 80. An engineer proposes: “Set targetPort to the Service's external port by habit even though the application listens on a different container port.” What adverse outcome would be most direct?

  1. PersistentVolumeClaims remain Pending or Pods fail to mount because the required driver integration is missing.
  2. Packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.
  3. The route remains nonfunctional because nothing reconciles it into an application traffic proxy.
  4. Priority differentiation is lost and capacity shortages still prevent scheduling or trigger avoidable disruption.

Explanation

Correct Answer

B:

Packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes. The shortcut creates this risk because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Incorrect Answers

A:

That outcome concerns the distinct objective “Understand CSI drivers and volume attachment responsibilities”; it is not the most direct consequence of this shortcut. The relevant consequence is that packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.

C:

That outcome concerns the distinct objective “Choose Ingress or Gateway API with an implementing controller for HTTP exposure”; it is not the most direct consequence of this shortcut. The relevant consequence is that packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.

D:

That outcome concerns the distinct objective “Use PriorityClasses and understand preemption without assuming they guarantee availability”; it is not the most direct consequence of this shortcut. The relevant consequence is that packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.

Question 515

An inventory service listens on port 8080 but clients call its Service on port 80. What pair of supported action and practical verification should be approved?

  1. Define appropriate HTTP routing through an installed Ingress controller or Gateway API controller rather than expecting the API object alone to provision a proxy. Acceptance evidence: Deploy a test hostname route, verify a compatible controller exists and inspect the programmed listener and backend status.
  2. Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Acceptance evidence: Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.
  3. Select an access mode supported by the actual storage driver and workload placement requirements rather than assuming every volume supports concurrent writes from every node. Acceptance evidence: Use a synthetic two-node workload and compare expected attach behavior for an RWO volume with a documented RWX shared filesystem.
  4. Choose Pod affinity only when co-locating related workloads is beneficial and verify independent network policies still govern traffic. Acceptance evidence: Apply a preferred Pod affinity against a cache Pod label and inspect node placement while testing access policy separately.

Explanation

Correct Answer

B:

Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Acceptance evidence: Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings. This pairing is justified because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Incorrect Answers

A:

This action and check address the distinct objective “Choose Ingress or Gateway API with an implementing controller for HTTP exposure” instead of the stated acceptance requirement. The matching action is to match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Its confirming test is to inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

C:

This action and check address the distinct objective “Choose ReadWriteOnce and ReadWriteMany access modes by backend capability” instead of the stated acceptance requirement. The matching action is to match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Its confirming test is to inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

D:

This action and check address the distinct objective “Use Pod affinity for co-location without assuming it creates networking permissions” instead of the stated acceptance requirement. The matching action is to match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Its confirming test is to inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Question 516

A student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. What technical action should the platform team take in this situation?

  1. Choose service boundaries around business capabilities and operational needs, documenting communication cost, ownership and fault tolerance.
  2. Check that a supported CNI plugin assigns reachable Pod addresses across worker nodes before troubleshooting Service routing or DNS names.
  3. Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used.
  4. Give clients a Service DNS name rather than hardcoding Pod IP addresses that can change when replicas are replaced.

Explanation

Correct Answer

C:

The situation is that a student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. This resolves the issue because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors. To verify, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Incorrect Answers

A:

This option addresses the distinct objective “Contrast cloud-native microservices with a monolith without treating either as inherently superior”, not the immediate requirement. Microservices permit independent deployment and scaling but introduce network dependencies and data consistency challenges; a monolith can remain appropriate for smaller teams. For the stated case, a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

B:

This option addresses the distinct objective “Distinguish the CNI Pod network from Service discovery and routing”, not the immediate requirement. Kubernetes expects a Pod network providing Pod-to-Pod connectivity; the CNI implementation configures networking while Services provide stable virtual access to changing endpoints. For the stated case, a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

D:

This option addresses the distinct objective “Distinguish Pod IPs from stable Services during rescheduling”, not the immediate requirement. Pods receive network identities that can be ephemeral, while a Service maintains a stable discovery and traffic abstraction over selected endpoints. For the stated case, a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Question 517

A student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. What underlying Kubernetes behavior is most relevant to this technical decision?

  1. A Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.
  2. Pods receive network identities that can be ephemeral, while a Service maintains a stable discovery and traffic abstraction over selected endpoints.
  3. CSI separates storage vendor implementation from Kubernetes core and manages provisioning, attachment and node mounting through driver-defined capabilities.
  4. The spec describes requested behavior, while status is produced by controllers and node agents to report observed results and errors.

Explanation

Correct Answer

A:

The situation is that a student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. A Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors. It supports this action: Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. To confirm, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Incorrect Answers

B:

That statement explains the distinct objective “Distinguish Pod IPs from stable Services during rescheduling” rather than the cause in this case. The deciding mechanism here is that a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

C:

That statement explains the distinct objective “Understand CSI drivers and volume attachment responsibilities” rather than the cause in this case. The deciding mechanism here is that a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

D:

That statement explains the distinct objective “Interpret Kubernetes spec and status fields without confusing intent with condition” rather than the cause in this case. The deciding mechanism here is that a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Question 518

A student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. What acceptance check most directly confirms this requirement is met?

  1. Create matching Service names in two namespaces and test separately configured RBAC and NetworkPolicy access boundaries.
  2. Create a claim using a named test StorageClass and compare provisioner events and binding timing with a non-existent class.
  3. Deploy two synthetic Pods on different nodes and test direct Pod IP connectivity before testing the Service virtual IP.
  4. Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Explanation

Correct Answer

D:

The situation is that a student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings. This is the relevant test because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Use namespaces as organizational scopes without treating them as firewalls”, but not the required result. For this case, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

B:

This check would help evaluate the distinct objective “Use StorageClass for dynamic volume provisioning rather than handcrafting every disk”, but not the required result. For this case, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

C:

This check would help evaluate the distinct objective “Distinguish the CNI Pod network from Service discovery and routing”, but not the required result. For this case, inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Question 519

A student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. The team suggests: “Set targetPort to the Service's external port by habit even though the application listens on a different container port.” Which failure should the reviewer anticipate?

  1. Teams can share unintended network and resource access while administrators believe the naming boundary is protective.
  2. Packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.
  3. The scheduler may evaluate an unintended Pod group or fail to spread the intended replicas.
  4. Requests fail after a replica is replaced because the client bypassed the Service abstraction.

Explanation

Correct Answer

B:

The situation is that a student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. Packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes. The shortcut creates this risk because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Incorrect Answers

A:

That outcome concerns the distinct objective “Separate multi-tenant namespace governance from actual isolation guarantees”; it is not the most direct consequence of this shortcut. The relevant consequence is that packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.

C:

That outcome concerns the distinct objective “Spread replicas across failure domains with topologySpreadConstraints”; it is not the most direct consequence of this shortcut. The relevant consequence is that packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.

D:

That outcome concerns the distinct objective “Distinguish Pod IPs from stable Services during rescheduling”; it is not the most direct consequence of this shortcut. The relevant consequence is that packets reach the wrong destination socket and the Service appears unavailable despite healthy Pod processes.

Question 520

A student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. Which engineering change and test jointly addresses the scenario?

  1. Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Acceptance evidence: Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.
  2. 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.
  3. 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.
  4. Use cluster DNS records such as service.namespace.svc.cluster.local when a Pod connects to Services in other namespaces. Acceptance evidence: Run nslookup for a Service using short and namespace-qualified names from test Pods in two different namespaces.

Explanation

Correct Answer

A:

The situation is that a student connects a NodePort Service to a Pod running an HTTP process on an unexpected internal port. Match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Acceptance evidence: Inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings. This pairing is justified because a Service exposes port to clients and forwards to targetPort on selected endpoints; a mismatched targetPort can break delivery even with valid DNS and selectors.

Incorrect Answers

B:

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 match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Its confirming test is to inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

C:

This action and check address the distinct objective “Explain desired state versus observed status in Kubernetes objects” instead of the stated acceptance requirement. The matching action is to match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Its confirming test is to inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

D:

This action and check address the distinct objective “Verify CoreDNS resolution and namespace-qualified Service names” instead of the stated acceptance requirement. The matching action is to match a Service's exposed port and targetPort to the actual listening application container, checking protocol and named ports when used. Its confirming test is to inspect the container listener, Service port fields and a test Pod connection before changing unrelated firewall settings.

Kubernetes and Cloud Native Associate (KCNA) Practice Tests