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 43

Question 420

A nonprofit investigates a container requiring root solely because its image directory permissions were configured incorrectly. Which combined solution and independent check are most directly justified?

  1. Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. Acceptance evidence: Compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.
  2. Set runAsNonRoot, suitable user IDs and drop unneeded Linux capabilities rather than assuming every container requires root. Acceptance evidence: Deploy a test Pod with runAsNonRoot and verify its effective user and capability sets while confirming app file permissions work.
  3. 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.
  4. Apply appropriate ResourceQuota and LimitRange policy to bound namespace consumption and guide default container resource requests or limits. Acceptance evidence: Create a controlled test namespace with a tiny quota and verify a request exceeding aggregate limits is rejected.

Explanation

Correct Answer

B:

The situation is that a nonprofit investigates a container requiring root solely because its image directory permissions were configured incorrectly. Set runAsNonRoot, suitable user IDs and drop unneeded Linux capabilities rather than assuming every container requires root. Acceptance evidence: Deploy a test Pod with runAsNonRoot and verify its effective user and capability sets while confirming app file permissions work. This pairing is justified because securityContext configures process identity and privilege boundaries, and unnecessary root privileges increase impact if an application is compromised.

Incorrect Answers

A:

This action and check address the distinct objective “Build smaller images with multistage builds and remove unnecessary tooling” instead of the stated acceptance requirement. The matching action is to set runAsNonRoot, suitable user IDs and drop unneeded Linux capabilities rather than assuming every container requires root. Its confirming test is to deploy a test Pod with runAsNonRoot and verify its effective user and capability sets while confirming app file permissions work.

C:

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 set runAsNonRoot, suitable user IDs and drop unneeded Linux capabilities rather than assuming every container requires root. Its confirming test is to deploy a test Pod with runAsNonRoot and verify its effective user and capability sets while confirming app file permissions work.

D:

This action and check address the distinct objective “Understand resource quotas and LimitRanges for namespace capacity governance” instead of the stated acceptance requirement. The matching action is to set runAsNonRoot, suitable user IDs and drop unneeded Linux capabilities rather than assuming every container requires root. Its confirming test is to deploy a test Pod with runAsNonRoot and verify its effective user and capability sets while confirming app file permissions work.

Question 421

A scientific analysis API needs 50 seconds to load its model at first start. Which Kubernetes or cloud-native implementation decision best solves the stated problem?

  1. Inspect image default command and Pod command or args settings to determine what executable starts in the container.
  2. Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization.
  3. Pin validated production images by registry digest and promote the same signed artifact across environments.
  4. Define symptom-based Prometheus alerting rules with sensible durations and route alerts through Alertmanager to the responsible service team.

Explanation

Correct Answer

B:

Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. This resolves the issue because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds. To verify, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Incorrect Answers

A:

This option addresses the distinct objective “Understand ENTRYPOINT and command overrides when a container exits immediately”, not the immediate requirement. The container runtime starts the configured process, and a crash or early exit can terminate the container regardless of Kubernetes placement. For the stated case, readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

C:

This option addresses the distinct objective “Use an immutable image digest for exact deployment provenance”, not the immediate requirement. Tags can move to a different image digest over time, while a digest identifies specific content independently of a mutable label. For the stated case, readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

D:

This option addresses the distinct objective “Build meaningful alert rules and route notifications through Alertmanager”, not the immediate requirement. Alert rules evaluate time-series expressions while Alertmanager groups, routes and silences notifications; neither automatically fixes the underlying workload. For the stated case, readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Question 422

A scientific analysis API needs 50 seconds to load its model at first start. Which platform mechanism explains why the suitable approach works?

  1. Alert rules evaluate time-series expressions while Alertmanager groups, routes and silences notifications; neither automatically fixes the underlying workload.
  2. Image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.
  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. Readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Explanation

Correct Answer

D:

Readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds. It supports this action: Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. To confirm, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Incorrect Answers

A:

That statement explains the distinct objective “Build meaningful alert rules and route notifications through Alertmanager” rather than the cause in this case. The deciding mechanism here is that readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

B:

That statement explains the distinct objective “Handle private registry pulls with dedicated credentials instead of embedding secrets in images” rather than the cause in this case. The deciding mechanism here is that readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

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 readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Question 423

A scientific analysis API needs 50 seconds to load its model at first start. Which controlled observation would best validate the intended improvement?

  1. Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.
  2. Reproduce a missing PVC in a test namespace and confirm the Pod Events directly indicate the unavailable claim.
  3. Inspect synthetic ConfigMap and Secret manifests, then test that an unprivileged ServiceAccount cannot read the private Secret.
  4. Deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Explanation

Correct Answer

A:

Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings. This is the relevant test because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Incorrect Answers

B:

This check would help evaluate the distinct objective “Use Events and pod describe for failed volume mounting”, but not the required result. For this case, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

C:

This check would help evaluate the distinct objective “Distinguish ConfigMaps from Secrets and avoid storing credentials in public configuration”, but not the required result. For this case, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

D:

This check would help evaluate the distinct objective “Handle private registry pulls with dedicated credentials instead of embedding secrets in images”, but not the required result. For this case, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Question 424

A scientific analysis API needs 50 seconds to load its model at first start. An engineer proposes: “Use a very short liveness deadline for a slow-starting service and expect it to become ready faster.” What adverse outcome would be most direct?

  1. The container may enter a restart loop before completing initialization, prolonging unavailability.
  2. Containers gain broad host exposure and compromise blast radius becomes larger than the application's needs.
  3. A workload continues crashing because the root cause is memory exhaustion, not name resolution.
  4. A compromised unrelated Pod may reach protected application ports across trust boundaries.

Explanation

Correct Answer

A:

The container may enter a restart loop before completing initialization, prolonging unavailability. The shortcut creates this risk because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Incorrect Answers

B:

That outcome concerns the distinct objective “Run images with least-privilege runtime security contexts”; it is not the most direct consequence of this shortcut. The relevant consequence is that the container may enter a restart loop before completing initialization, prolonging unavailability.

C:

That outcome concerns the distinct objective “Distinguish memory limits from CPU throttling for scheduling and runtime symptoms”; it is not the most direct consequence of this shortcut. The relevant consequence is that the container may enter a restart loop before completing initialization, prolonging unavailability.

D:

That outcome concerns the distinct objective “Limit workload-to-workload access with explicit NetworkPolicy allow rules”; it is not the most direct consequence of this shortcut. The relevant consequence is that the container may enter a restart loop before completing initialization, prolonging unavailability.

Question 425

A scientific analysis API needs 50 seconds to load its model at first start. What pair of supported action and practical verification should be approved?

  1. Use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. Acceptance evidence: Deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.
  2. Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Acceptance evidence: Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.
  3. Use an authorized kubectl debug ephemeral container when an application image lacks troubleshooting tools and policy permits ephemeral containers. Acceptance evidence: In a lab add a read-only debug container, inspect network conditions and verify audit logs record the ephemeral container action.
  4. Identify whether the cluster uses kube-proxy or an alternative Service dataplane before diagnosing virtual Service IP forwarding behavior. Acceptance evidence: Read the cluster networking configuration, find a test Service and verify backend connectivity using the installed dataplane.

Explanation

Correct Answer

B:

Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Acceptance evidence: Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings. This pairing is justified because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Incorrect Answers

A:

This action and check address the distinct objective “Handle private registry pulls with dedicated credentials instead of embedding secrets in images” instead of the stated acceptance requirement. The matching action is to configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Its confirming test is to delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

C:

This action and check address the distinct objective “Use ephemeral debugging containers only with appropriate permission and safeguards” instead of the stated acceptance requirement. The matching action is to configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Its confirming test is to delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

D:

This action and check address the distinct objective “Understand service proxy implementations without assuming kube-proxy is mandatory” instead of the stated acceptance requirement. The matching action is to configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Its confirming test is to delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Question 426

A school learning platform reports traffic failures while Pods are Running but their readiness checks fail. Which Kubernetes or cloud-native implementation decision best solves the stated problem?

  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.
  2. Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization.
  3. Taint dedicated nodes and grant only intended workloads matching tolerations, combining node affinity when exclusive placement is required.
  4. Build an OCI-compatible image with immutable packaged artifacts and treat running container writable state as ephemeral.

Explanation

Correct Answer

B:

The situation is that a school learning platform reports traffic failures while Pods are Running but their readiness checks fail. Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. This resolves the issue because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds. To verify, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Incorrect Answers

A:

This option addresses the distinct objective “Choose Ingress or Gateway API with an implementing controller for HTTP exposure”, not the immediate requirement. Ingress and Gateway API express routing intent, while an actual controller/dataplane implements TLS termination, listeners and backend forwarding. For the stated case, readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

C:

This option addresses the distinct objective “Understand taints and tolerations as repulsion controls”, not the immediate requirement. A NoSchedule taint repels Pods without a matching toleration; tolerance permits consideration but does not force placement on that node. For the stated case, readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

D:

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, readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Question 427

A school learning platform reports traffic failures while Pods are Running but their readiness checks fail. Which platform mechanism explains why the suitable approach works?

  1. Containers in a Pod share a network namespace and IP address and can coordinate on localhost, while the Pod is scheduled as one unit.
  2. Readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.
  3. kubectl logs retrieves container output and --previous can expose the prior terminated instance, but application output is not a substitute for cluster Events.
  4. Image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Explanation

Correct Answer

B:

The situation is that a school learning platform reports traffic failures while Pods are Running but their readiness checks fail. Readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds. It supports this action: Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. To confirm, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Incorrect Answers

A:

That statement explains the distinct objective “Use Pods as the shared network and storage execution unit” rather than the cause in this case. The deciding mechanism here is that readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

C:

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 readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

D:

The situation is that a school learning platform reports traffic failures while Pods are Running but their readiness checks fail. That statement explains the distinct objective “Handle private registry pulls with dedicated credentials instead of embedding secrets in images” rather than the cause in this case. The deciding mechanism here is that readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Question 428

A school learning platform reports traffic failures while Pods are Running but their readiness checks fail. Which controlled observation would best validate the intended improvement?

  1. Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.
  2. With synthetic users verify a trusted API connection, denied privilege escalation and appropriate audit entries for failed requests.
  3. Compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.
  4. In a training namespace inspect PID views and a controlled memory limit, noting which mechanism changes identity or resource behavior.

Explanation

Correct Answer

A:

The situation is that a school learning platform reports traffic failures while Pods are Running but their readiness checks fail. Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings. This is the relevant test because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Incorrect Answers

B:

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, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

C:

This check would help evaluate the distinct objective “Build smaller images with multistage builds and remove unnecessary tooling”, but not the required result. For this case, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

D:

This check would help evaluate the distinct objective “Explain Linux namespaces and cgroups as distinct container isolation mechanisms”, but not the required result. For this case, delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Question 429

A school learning platform reports traffic failures while Pods are Running but their readiness checks fail. An engineer proposes: “Use a very short liveness deadline for a slow-starting service and expect it to become ready faster.” What adverse outcome would be most direct?

  1. A workload continues crashing because the root cause is memory exhaustion, not name resolution.
  2. The container may enter a restart loop before completing initialization, prolonging unavailability.
  3. The workload gains unnecessary listening services and mutable changes that disappear on replacement.
  4. Security decisions overlook shared-kernel attack surfaces and workload-specific resource contention.

Explanation

Correct Answer

B:

The situation is that a school learning platform reports traffic failures while Pods are Running but their readiness checks fail. The container may enter a restart loop before completing initialization, prolonging unavailability. The shortcut creates this risk because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Incorrect Answers

A:

The situation is that a school learning platform reports traffic failures while Pods are Running but their readiness checks fail. That outcome concerns the distinct objective “Distinguish memory limits from CPU throttling for scheduling and runtime symptoms”; it is not the most direct consequence of this shortcut. The relevant consequence is that the container may enter a restart loop before completing initialization, prolonging unavailability.

C:

That outcome concerns the distinct objective “Use ephemeral debugging containers only with appropriate permission and safeguards”; it is not the most direct consequence of this shortcut. The relevant consequence is that the container may enter a restart loop before completing initialization, prolonging unavailability.

D:

That outcome concerns the distinct objective “Explain Linux namespaces and cgroups as distinct container isolation mechanisms”; it is not the most direct consequence of this shortcut. The relevant consequence is that the container may enter a restart loop before completing initialization, prolonging unavailability.

Question 430

A school learning platform reports traffic failures while Pods are Running but their readiness checks fail. What pair of supported action and practical verification should be approved?

  1. Read a workload's spec and status separately and inspect conditions when determining whether an API change became healthy. Acceptance evidence: Apply a test manifest with impossible node constraints, then inspect the accepted spec and Pending status/Events.
  2. Select a StatefulSet with volumeClaimTemplates for a stateful clustered application requiring stable Pod names and individual durable volumes. Acceptance evidence: Scale a test StatefulSet and inspect web-0, web-1 and each distinct PVC before deleting and recreating one Pod.
  3. Set runAsNonRoot, suitable user IDs and drop unneeded Linux capabilities rather than assuming every container requires root. Acceptance evidence: Deploy a test Pod with runAsNonRoot and verify its effective user and capability sets while confirming app file permissions work.
  4. Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Acceptance evidence: Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Explanation

Correct Answer

D:

The situation is that a school learning platform reports traffic failures while Pods are Running but their readiness checks fail. Configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Acceptance evidence: Delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings. This pairing is justified because readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.

Incorrect Answers

A:

This action and check address the distinct objective “Interpret Kubernetes spec and status fields without confusing intent with condition” instead of the stated acceptance requirement. The matching action is to configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Its confirming test is to delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

B:

This action and check address the distinct objective “Use StatefulSet for stable ordinal identity and persistent per-replica claims” instead of the stated acceptance requirement. The matching action is to configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Its confirming test is to delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

C:

This action and check address the distinct objective “Run images with least-privilege runtime security contexts” instead of the stated acceptance requirement. The matching action is to configure readiness to stop sending Service traffic to an unready Pod, liveness to restart an unhealthy container and startup to allow slow initialization. Its confirming test is to delay a synthetic app response and compare EndpointSlice readiness with restart counts under controlled probe settings.

Kubernetes and Cloud Native Associate (KCNA) Practice Tests