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 39

Question 380

A school district uses an image tag reused by many builds and needs provenance during incident response. Which implementation together with matching acceptance evidence best meets this case?

  1. 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.
  2. Pin validated production images by registry digest and promote the same signed artifact across environments. Acceptance evidence: Resolve an approved image digest, deploy that reference in staging and verify the same digest exists in the production Pod spec.
  3. Use kubectl get for concise resource lists and kubectl describe for detailed status, conditions and Events when triaging a workload. Acceptance evidence: Compare kubectl get pods -o wide with kubectl describe pod for a test image-pull failure and note which output shows recent Events.
  4. Review Sandbox, Incubating and Graduated CNCF stages as community maturity signals while independently assessing a project's fitness, lifecycle and security. Acceptance evidence: Compare the governance and release activity of two projects and document which operational support and security tests are still required.

Explanation

Correct Answer

B:

The situation is that a school district uses an image tag reused by many builds and needs provenance during incident response. Pin validated production images by registry digest and promote the same signed artifact across environments. Acceptance evidence: Resolve an approved image digest, deploy that reference in staging and verify the same digest exists in the production Pod spec. This pairing is justified because tags can move to a different image digest over time, while a digest identifies specific content independently of a mutable label.

Incorrect Answers

A:

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 pin validated production images by registry digest and promote the same signed artifact across environments. Its confirming test is to resolve an approved image digest, deploy that reference in staging and verify the same digest exists in the production Pod spec.

C:

This action and check address the distinct objective “Use kubectl get and describe for distinct inspection needs” instead of the stated acceptance requirement. The matching action is to pin validated production images by registry digest and promote the same signed artifact across environments. Its confirming test is to resolve an approved image digest, deploy that reference in staging and verify the same digest exists in the production Pod spec.

D:

This action and check address the distinct objective “Understand CNCF project maturity stages without equating them to security approval” instead of the stated acceptance requirement. The matching action is to pin validated production images by registry digest and promote the same signed artifact across environments. Its confirming test is to resolve an approved image digest, deploy that reference in staging and verify the same digest exists in the production Pod spec.

Question 381

A manufacturer stores proprietary service images in a private registry restricted by project. What technical action should the platform team take in this situation?

  1. Store approved declarative cluster manifests in Git and let a GitOps controller reconcile differences while keeping sensitive access appropriately scoped.
  2. Use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image.
  3. Set runAsNonRoot, suitable user IDs and drop unneeded Linux capabilities rather than assuming every container requires root.
  4. Use container runtime namespaces to isolate views of processes and networks while using cgroups to account for and constrain resources.

Explanation

Correct Answer

B:

Use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. This resolves the issue because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs. To verify, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Incorrect Answers

A:

This option addresses the distinct objective “Apply GitOps reconciliation with a version-controlled desired state”, not the immediate requirement. GitOps connects a versioned desired-state source with automated drift detection and reconciliation; direct manual changes may be reverted by the controller. For the stated case, image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

C:

This option addresses the distinct objective “Run images with least-privilege runtime security contexts”, not the immediate requirement. SecurityContext configures process identity and privilege boundaries, and unnecessary root privileges increase impact if an application is compromised. For the stated case, image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

D:

This option addresses the distinct objective “Explain Linux namespaces and cgroups as distinct container isolation mechanisms”, not the immediate requirement. Linux namespaces affect visibility and isolation boundaries, while cgroups organize and limit resource usage; neither automatically supplies a full virtual machine. For the stated case, image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Question 382

A manufacturer stores proprietary service images in a private registry restricted by project. What underlying Kubernetes behavior is most relevant to this technical decision?

  1. Image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.
  2. A rollout can be API-valid yet degrade business behavior; measured acceptance signals and a preserved prior revision make controlled rollback possible.
  3. Readiness affects endpoint eligibility while liveness can cause restarts; a startup probe defers other probe checks until initialization succeeds.
  4. Pod affinity affects scheduler placement relative to labeled Pods in selected topology domains, not application authentication or firewall rules.

Explanation

Correct Answer

A:

Image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs. It supports this action: Use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. To confirm, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Incorrect Answers

B:

That statement explains the distinct objective “Design a release rollback trigger from measurable service signals” rather than the cause in this case. The deciding mechanism here is that image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

C:

That statement explains the distinct objective “Understand readiness, liveness and startup probes as different signals” rather than the cause in this case. The deciding mechanism here is that image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

D:

That statement explains the distinct objective “Use Pod affinity for co-location without assuming it creates networking permissions” rather than the cause in this case. The deciding mechanism here is that image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Question 383

A manufacturer stores proprietary service images in a private registry restricted by project. What acceptance check most directly confirms this requirement is met?

  1. Deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.
  2. With restricted identities, check get pods succeeds while delete secrets and create clusterroles are denied.
  3. Inspect a failed Pod's last terminated reason and check whether an unintended command override prevented the server from starting.
  4. Deploy two synthetic Pods on different nodes and test direct Pod IP connectivity before testing the Service virtual IP.

Explanation

Correct Answer

A:

Deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token. This is the relevant test because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Incorrect Answers

B:

This check would help evaluate the distinct objective “Use least-privilege kubectl authentication and authorization during routine administration”, but not the required result. For this case, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

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, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

D:

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, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Question 384

A manufacturer stores proprietary service images in a private registry restricted by project. The team suggests: “Write the registry password into a Dockerfile RUN command so every user can pull the image without cluster configuration.” Which failure should the reviewer anticipate?

  1. A leaked image layer or build log can disclose credentials and grant unwanted registry access.
  2. Untrusted images or privileged settings can enter production without an auditable approval decision.
  3. Replacement containers return to the unmodified image and reintroduce a fixed vulnerability or behavior.
  4. Replacing the Pod destroys the only copy of business state unless independent durable storage exists.

Explanation

Correct Answer

A:

A leaked image layer or build log can disclose credentials and grant unwanted registry access. The shortcut creates this risk because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Incorrect Answers

B:

That outcome concerns the distinct objective “Define secure release governance with staged approvals and policy verification”; it is not the most direct consequence of this shortcut. The relevant consequence is that a leaked image layer or build log can disclose credentials and grant unwanted registry access.

C:

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 a leaked image layer or build log can disclose credentials and grant unwanted registry access.

D:

That outcome concerns the distinct objective “Understand emptyDir as Pod-lifetime shared storage, not durable application persistence”; it is not the most direct consequence of this shortcut. The relevant consequence is that a leaked image layer or build log can disclose credentials and grant unwanted registry access.

Question 385

A manufacturer stores proprietary service images in a private registry restricted by project. Which engineering change and test jointly addresses the scenario?

  1. Grant operators only required API verbs and resources using RBAC, then test with kubectl auth can-i and separate synthetic identities. Acceptance evidence: With restricted identities, check get pods succeeds while delete secrets and create clusterroles are denied.
  2. Inspect probe configuration, Pod Ready conditions and restart events to identify whether traffic eligibility or container execution is failing. Acceptance evidence: Induce a temporary readiness failure in staging and verify traffic stops without a restart; then separately test controlled liveness failure.
  3. Use emptyDir for temporary sharing between containers within a Pod, and PVC-backed storage when data must survive Pod replacement. Acceptance evidence: Write a synthetic temporary file into emptyDir, restart a container and then recreate the Pod to compare lifetime semantics.
  4. 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.

Explanation

Correct Answer

D:

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. This pairing is justified because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Incorrect Answers

A:

This action and check address the distinct objective “Use least-privilege kubectl authentication and authorization during routine administration” instead of the stated acceptance requirement. The matching action is to use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. Its confirming test is to deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

B:

This action and check address the distinct objective “Investigate readiness failures separately from liveness-related restarts” instead of the stated acceptance requirement. The matching action is to use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. Its confirming test is to deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

C:

This action and check address the distinct objective “Understand emptyDir as Pod-lifetime shared storage, not durable application persistence” instead of the stated acceptance requirement. The matching action is to use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. Its confirming test is to deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Question 386

A financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. What technical action should the platform team take in this situation?

  1. Use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image.
  2. Use a Deployment for a replicated stateless application requiring rolling updates and replacement of failed Pods.
  3. Separate compile and runtime stages to retain only required binary and runtime dependencies in the deployed container image.
  4. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace.

Explanation

Correct Answer

A:

The situation is that a financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. Use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. This resolves the issue because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs. To verify, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Incorrect Answers

B:

This option addresses the distinct objective “Distinguish Deployment desired state from a manually created Pod”, not the immediate requirement. A Deployment owns ReplicaSets that manage matching Pods and supports declarative rollout history, unlike an independent Pod object. For the stated case, image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

C:

This option addresses the distinct objective “Build smaller images with multistage builds and remove unnecessary tooling”, not the immediate requirement. Multistage builds reduce image contents and potential attack surface by keeping build toolchains and source artifacts out of the final runtime layer. For the stated case, image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

D:

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, image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Question 387

A financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. What underlying Kubernetes behavior is most relevant to this technical decision?

  1. A quota constrains aggregate namespace resource usage, while a LimitRange validates or defaults eligible individual resource settings.
  2. PV access modes express volume mount constraints and driver support; ReadWriteOnce normally restricts writable use to one node, while ReadWriteMany requires a capable backend.
  3. Image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.
  4. emptyDir is initialized for a Pod and its contents can be shared among containers but do not survive the Pod's removal.

Explanation

Correct Answer

C:

The situation is that a financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. Image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs. It supports this action: Use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. To confirm, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Incorrect Answers

A:

That statement explains the distinct objective “Understand resource quotas and LimitRanges for namespace capacity governance” rather than the cause in this case. The deciding mechanism here is that image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

B:

That statement explains the distinct objective “Choose ReadWriteOnce and ReadWriteMany access modes by backend capability” rather than the cause in this case. The deciding mechanism here is that image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

D:

That statement explains the distinct objective “Understand emptyDir as Pod-lifetime shared storage, not durable application persistence” rather than the cause in this case. The deciding mechanism here is that image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Question 388

A financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. What acceptance check most directly confirms this requirement is met?

  1. Deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.
  2. Label one worker disk=ssd, apply a Pod requiring disk=ssd and confirm it binds only to the matching eligible worker.
  3. Resolve an approved image digest, deploy that reference in staging and verify the same digest exists in the production Pod spec.
  4. Generate controlled CPU load, verify HPA current/target metric reporting and observe replica changes within configured limits.

Explanation

Correct Answer

A:

The situation is that a financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. Deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token. This is the relevant test because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Incorrect Answers

B:

This check would help evaluate the distinct objective “Use nodeSelector to place a workload on nodes with required labels”, but not the required result. For this case, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

C:

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, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

D:

This check would help evaluate the distinct objective “Use HorizontalPodAutoscaler metrics rather than ad hoc instance scripts”, but not the required result. For this case, deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Question 389

A financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. The team suggests: “Write the registry password into a Dockerfile RUN command so every user can pull the image without cluster configuration.” Which failure should the reviewer anticipate?

  1. The Pod remains unschedulable because requested capacity and node feasibility did not change.
  2. DNS disruption may affect the whole cluster while the actual routing mismatch remains unchanged.
  3. A later registry push can change deployed bits unexpectedly, defeating reproducible approval and rollback.
  4. A leaked image layer or build log can disclose credentials and grant unwanted registry access.

Explanation

Correct Answer

D:

The situation is that a financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. A leaked image layer or build log can disclose credentials and grant unwanted registry access. The shortcut creates this risk because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Incorrect Answers

A:

That outcome concerns the distinct objective “Use container resource requests to help the scheduler fit Pods on nodes”; it is not the most direct consequence of this shortcut. The relevant consequence is that a leaked image layer or build log can disclose credentials and grant unwanted registry access.

B:

That outcome concerns the distinct objective “Distinguish a failed Service selector from broken DNS or a failing backend”; it is not the most direct consequence of this shortcut. The relevant consequence is that a leaked image layer or build log can disclose credentials and grant unwanted registry access.

C:

That outcome concerns the distinct objective “Use an immutable image digest for exact deployment provenance”; it is not the most direct consequence of this shortcut. The relevant consequence is that a leaked image layer or build log can disclose credentials and grant unwanted registry access.

Question 390

A financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. Which engineering change and test jointly addresses the scenario?

  1. Measure request latency and error rates, inspect application logs and correlate trace spans for the affected request before guessing which Pod is slow. Acceptance evidence: Generate a synthetic slow downstream call and verify a trace links frontend and backend spans while metrics show the latency change.
  2. 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.
  3. 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.
  4. Review requests, limits, QoS class and termination reasons rather than interpreting every restart as a scheduler failure. Acceptance evidence: Create a synthetic CPU-intensive workload with tight CPU limits and compare throttling metrics with an OOMKilled test Pod.

Explanation

Correct Answer

B:

The situation is that a financial service team sees ImagePullBackOff because its namespace lacks valid image pull credentials. 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. This pairing is justified because image-pull credentials are consumed before the application starts and should not be hardcoded into container layers or app logs.

Incorrect Answers

A:

This action and check address the distinct objective “Use metrics, logs and traces together when investigating cross-service latency” instead of the stated acceptance requirement. The matching action is to use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. Its confirming test is to deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

C:

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 use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. Its confirming test is to deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

D:

This action and check address the distinct objective “Distinguish memory limits from CPU throttling for scheduling and runtime symptoms” instead of the stated acceptance requirement. The matching action is to use narrowly scoped imagePullSecrets or an approved node identity to authorize the runtime to pull a private image. Its confirming test is to deploy a synthetic private image using an approved Secret and confirm unauthorized namespaces cannot reuse a broad registry token.

Kubernetes and Cloud Native Associate (KCNA) Practice Tests