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 44

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.

Question 431

A transit app compiles a Go service and wants a minimal image for edge deployments. What technical action should the platform team take in this situation?

  1. Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image.
  2. Combine a default-deny baseline with narrow app-label and namespace-label NetworkPolicy rules for approved traffic.
  3. Configure anti-affinity against other Pods with a specific label so replicas prefer or require separate failure domains as appropriate.
  4. Inspect image default command and Pod command or args settings to determine what executable starts in the container.

Explanation

Correct Answer

A:

Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. This resolves the issue because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer. To verify, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Incorrect Answers

B:

This option addresses the distinct objective “Limit workload-to-workload access with explicit NetworkPolicy allow rules”, not the immediate requirement. NetworkPolicies select Pods and define allowed flows; when a Pod becomes isolated, traffic is allowed only as permitted by applicable rules and plugin behavior. For the stated case, multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

C:

This option addresses the distinct objective “Use Pod anti-affinity to reduce correlated replica failure”, not the immediate requirement. Pod anti-affinity considers labels on existing Pods and topology keys such as hostname; it does not directly guarantee unlimited nodes. For the stated case, multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

D:

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, multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Question 432

A transit app compiles a Go service and wants a minimal image for edge deployments. What underlying Kubernetes behavior is most relevant to this technical decision?

  1. Open-source community processes provide transparent review and shared maintenance, but do not imply unreviewed external code should be merged into production.
  2. Multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.
  3. The scheduler evaluates requests against node allocatable capacity; limits govern runtime ceilings and do not substitute for scheduling requests.
  4. An image contains layers and configuration; each container adds runtime state that can vanish on replacement unless data uses explicit persistent storage.

Explanation

Correct Answer

B:

Multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer. It supports this action: Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. To confirm, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Incorrect Answers

A:

That statement explains the distinct objective “Use open community governance and contribution processes for sustainable cloud-native projects” rather than the cause in this case. The deciding mechanism here is that multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

C:

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 multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

D:

That statement explains the distinct objective “Distinguish a container image from a running container and its writable layer” rather than the cause in this case. The deciding mechanism here is that multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Question 433

A transit app compiles a Go service and wants a minimal image for edge deployments. What acceptance check most directly confirms this requirement is met?

  1. Test that one synthetic tenant cannot list another namespace's Secrets, send blocked traffic or exceed quota.
  2. Test the workload with and without a preferred zone and verify it still schedules when preferred nodes are busy.
  3. Inspect a failed Pod's last terminated reason and check whether an unintended command override prevented the server from starting.
  4. Compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Explanation

Correct Answer

D:

Compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts. This is the relevant test because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Separate multi-tenant namespace governance from actual isolation guarantees”, but not the required result. For this case, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

B:

This check would help evaluate the distinct objective “Distinguish preferred node affinity from required scheduling rules”, but not the required result. For this case, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

C:

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 SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Question 434

A transit app compiles a Go service and wants a minimal image for edge deployments. The team suggests: “Publish the entire compiler toolchain and test credentials inside the runtime image for convenience.” Which failure should the reviewer anticipate?

  1. More replicas fail the same way because the process configuration, not desired replica count, caused the exit.
  2. Monitoring dashboards show empty or stale series because the expected metrics were never exposed or scraped.
  3. The service can remain under capacity because a standalone Pod has no ReplicaSet controller to recreate it.
  4. The deployed artifact grows, may leak build credentials and exposes unnecessary packages.

Explanation

Correct Answer

D:

The deployed artifact grows, may leak build credentials and exposes unnecessary packages. The shortcut creates this risk because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Incorrect Answers

A:

That outcome concerns the distinct objective “Understand ENTRYPOINT and command overrides when a container exits immediately”; it is not the most direct consequence of this shortcut. The relevant consequence is that the deployed artifact grows, may leak build credentials and exposes unnecessary packages.

B:

That outcome concerns the distinct objective “Understand Prometheus pull-based metrics collection and exporters”; it is not the most direct consequence of this shortcut. The relevant consequence is that the deployed artifact grows, may leak build credentials and exposes unnecessary packages.

C:

That outcome concerns the distinct objective “Identify reconciliation work performed by kube-controller-manager”; it is not the most direct consequence of this shortcut. The relevant consequence is that the deployed artifact grows, may leak build credentials and exposes unnecessary packages.

Question 435

A transit app compiles a Go service and wants a minimal image for edge deployments. Which engineering change and test jointly addresses the scenario?

  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. 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.
  3. Define symptom-based Prometheus alerting rules with sensible durations and route alerts through Alertmanager to the responsible service team. Acceptance evidence: Trigger a controlled error-rate alert, verify its pending/firing transition and confirm the correct team receives a grouped notification.
  4. 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.

Explanation

Correct Answer

D:

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. This pairing is justified because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

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 separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. Its confirming test is to compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

B:

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 separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. Its confirming test is to compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

C:

This action and check address the distinct objective “Build meaningful alert rules and route notifications through Alertmanager” instead of the stated acceptance requirement. The matching action is to separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. Its confirming test is to compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Question 436

A university Dockerfile accidentally copies a private development configuration into a public runtime layer. Which engineering approach is the most appropriate for this cloud-native case?

  1. Inspect image default command and Pod command or args settings to determine what executable starts in the container.
  2. Use kubectl get for concise resource lists and kubectl describe for detailed status, conditions and Events when triaging a workload.
  3. Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image.
  4. Define a user-centered service level indicator and objective, such as percentage of successful requests within a latency threshold over a stated window.

Explanation

Correct Answer

C:

The situation is that a university Dockerfile accidentally copies a private development configuration into a public runtime layer. Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. This resolves the issue because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer. To verify, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Incorrect Answers

A:

The situation is that a university Dockerfile accidentally copies a private development configuration into a public runtime layer. 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, multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

B:

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, multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

D:

This option addresses the distinct objective “Use SLI and SLO measures to focus reliability objectives”, not the immediate requirement. A service level objective is a target for measured user-facing behavior; error budgets quantify allowed misses and help prioritize release risk. For the stated case, multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Question 437

A university Dockerfile accidentally copies a private development configuration into a public runtime layer. What infrastructure principle makes the correct treatment effective?

  1. Multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.
  2. Microservices permit independent deployment and scaling but introduce network dependencies and data consistency challenges; a monolith can remain appropriate for smaller teams.
  3. CPU limits may throttle running processes, whereas exceeding memory constraints can cause OOM termination; Pod scheduling itself depends on requests.
  4. Linux namespaces affect visibility and isolation boundaries, while cgroups organize and limit resource usage; neither automatically supplies a full virtual machine.

Explanation

Correct Answer

A:

The situation is that a university Dockerfile accidentally copies a private development configuration into a public runtime layer. Multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer. It supports this action: Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. To confirm, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Incorrect Answers

B:

That statement explains the distinct objective “Contrast cloud-native microservices with a monolith without treating either as inherently superior” rather than the cause in this case. The deciding mechanism here is that multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

C:

That statement explains the distinct objective “Distinguish memory limits from CPU throttling for scheduling and runtime symptoms” rather than the cause in this case. The deciding mechanism here is that multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

D:

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 multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Question 438

A university Dockerfile accidentally copies a private development configuration into a public runtime layer. What verification result would most convincingly distinguish a working solution from a claim?

  1. Inspect a failed Pod's last terminated reason and check whether an unintended command override prevented the server from starting.
  2. Compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.
  3. Write a synthetic temporary file into emptyDir, restart a container and then recreate the Pod to compare lifetime semantics.
  4. Model a synthetic two-service checkout dependency and compare rollout independence with failure and latency overhead against a single service.

Explanation

Correct Answer

B:

The situation is that a university Dockerfile accidentally copies a private development configuration into a public runtime layer. Compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts. This is the relevant test because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Incorrect Answers

A:

The situation is that a university Dockerfile accidentally copies a private development configuration into a public runtime layer. 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 SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

C:

This check would help evaluate the distinct objective “Understand emptyDir as Pod-lifetime shared storage, not durable application persistence”, but not the required result. For this case, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

D:

This check would help evaluate the distinct objective “Contrast cloud-native microservices with a monolith without treating either as inherently superior”, but not the required result. For this case, compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Question 439

A university Dockerfile accidentally copies a private development configuration into a public runtime layer. The change review contains this proposal: “Publish the entire compiler toolchain and test credentials inside the runtime image for convenience.” What risk matters most?

  1. The Pod continues restarting because Service DNS configuration is not the cause of the process exit.
  2. Replacement containers return to the unmodified image and reintroduce a fixed vulnerability or behavior.
  3. The deployed artifact grows, may leak build credentials and exposes unnecessary packages.
  4. An unrelated object may be targeted or the intended workload may remain untouched and unavailable.

Explanation

Correct Answer

C:

The situation is that a university Dockerfile accidentally copies a private development configuration into a public runtime layer. The deployed artifact grows, may leak build credentials and exposes unnecessary packages. The shortcut creates this risk because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Incorrect Answers

A:

That outcome concerns the distinct objective “Diagnose CrashLoopBackOff from restart history and previous logs”; it is not the most direct consequence of this shortcut. The relevant consequence is that the deployed artifact grows, may leak build credentials and exposes unnecessary packages.

B:

That outcome concerns the distinct objective “Distinguish a container image from a running container and its writable layer”; it is not the most direct consequence of this shortcut. The relevant consequence is that the deployed artifact grows, may leak build credentials and exposes unnecessary packages.

D:

That outcome concerns the distinct objective “Read the API resource model using namespaces and names rather than guessing ownership”; it is not the most direct consequence of this shortcut. The relevant consequence is that the deployed artifact grows, may leak build credentials and exposes unnecessary packages.

Question 440

A university Dockerfile accidentally copies a private development configuration into a public runtime layer. Which implementation together with matching acceptance evidence best meets this case?

  1. Build an OCI-compatible image with immutable packaged artifacts and treat running container writable state as ephemeral. Acceptance evidence: Build a test image, run a Pod and recreate it, verifying packaged files remain while an unmounted temporary file disappears.
  2. Assign related namespaced resources to a project namespace and enforce authorization and network isolation with separate policies. Acceptance evidence: Create matching Service names in two namespaces and test separately configured RBAC and NetworkPolicy access boundaries.
  3. Combine a default-deny baseline with narrow app-label and namespace-label NetworkPolicy rules for approved traffic. Acceptance evidence: Test synthetic frontend-to-backend reachability and deny a third unauthorized namespace while verifying DNS access is still deliberately allowed.
  4. 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.

Explanation

Correct Answer

D:

The situation is that a university Dockerfile accidentally copies a private development configuration into a public runtime layer. 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. This pairing is justified because multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer.

Incorrect Answers

A:

This action and check address the distinct objective “Distinguish a container image from a running container and its writable layer” instead of the stated acceptance requirement. The matching action is to separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. Its confirming test is to compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

B:

This action and check address the distinct objective “Use namespaces as organizational scopes without treating them as firewalls” instead of the stated acceptance requirement. The matching action is to separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. Its confirming test is to compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

C:

This action and check address the distinct objective “Limit workload-to-workload access with explicit NetworkPolicy allow rules” instead of the stated acceptance requirement. The matching action is to separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image. Its confirming test is to compare SBOM and file inventory of the builder image with the published runtime stage and confirm the service still starts.

Kubernetes and Cloud Native Associate (KCNA) Practice Tests