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 53

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.

Question 521

A university lets course assistants inspect one lab namespace without editing network policies. Which engineering approach is the most appropriate for this cloud-native case?

  1. Combine a default-deny baseline with narrow app-label and namespace-label NetworkPolicy rules for approved traffic.
  2. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace.
  3. Apply PriorityClasses sparingly for essential workloads and plan capacity so preemption does not unnecessarily evict useful lower-priority Pods.
  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

B:

Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. This resolves the issue because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate. To verify, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Incorrect Answers

A:

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, RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

C:

This option addresses the distinct objective “Use PriorityClasses and understand preemption without assuming they guarantee availability”, not the immediate requirement. Under pressure, a higher-priority pending Pod may preempt eligible lower-priority Pods, but constraints and eviction rules still apply. For the stated case, RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

D:

This option addresses the distinct objective “Understand ports, targetPort and protocol mapping in a Service”, not the immediate requirement. 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. For the stated case, RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Question 522

A university lets course assistants inspect one lab namespace without editing network policies. What infrastructure principle makes the correct treatment effective?

  1. ClusterRole defines permissions while ClusterRoleBinding makes them cluster-wide; RoleBinding limits effective namespaced scope even when referencing a ClusterRole.
  2. A PV reclaim policy controls how underlying storage is treated after claim release; deleting the Pod and deleting the PVC are distinct events with different effects.
  3. Kubernetes object transitions and application telemetry must be correlated; a healthy rollout condition alone does not prove user-level functionality.
  4. RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Explanation

Correct Answer

D:

RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate. It supports this action: Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. To confirm, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Incorrect Answers

A:

That statement explains the distinct objective “Distinguish ClusterRoles from Roles and binding scope” rather than the cause in this case. The deciding mechanism here is that RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

B:

That statement explains the distinct objective “Compare PV reclaim policies and explain data retention on PVC deletion” rather than the cause in this case. The deciding mechanism here is that RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

C:

That statement explains the distinct objective “Correlate application rollout revisions with error spikes” rather than the cause in this case. The deciding mechanism here is that RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Question 523

A university lets course assistants inspect one lab namespace without editing network policies. What verification result would most convincingly distinguish a working solution from a claim?

  1. Run a synthetic app that exits with a nonzero code, then confirm describe, previous logs and restart data reveal the failure path.
  2. Simulate controlled resource pressure with two priorities and inspect Events for whether a high-priority test Pod can schedule.
  3. Test that one synthetic tenant cannot list another namespace's Secrets, send blocked traffic or exceed quota.
  4. Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Explanation

Correct Answer

D:

Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace. This is the relevant test because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Incorrect Answers

A:

This check would help evaluate the distinct objective “Diagnose CrashLoopBackOff from restart history and previous logs”, but not the required result. For this case, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

B:

This check would help evaluate the distinct objective “Use PriorityClasses and understand preemption without assuming they guarantee availability”, but not the required result. For this case, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

C:

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, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Question 524

A university lets course assistants inspect one lab namespace without editing network policies. The change review contains this proposal: “Grant cluster-admin to a log reader because kubectl describe initially returns a forbidden error.” What risk matters most?

  1. The subject receives unnecessary authority to alter privileged resources or unrelated namespaces.
  2. Cross-service latency remains difficult to diagnose because spans cannot be tied to one request path.
  3. Dangerous existing configuration may persist because admission is not a universal replacement for every security control.
  4. A compromised unrelated Pod may reach protected application ports across trust boundaries.

Explanation

Correct Answer

A:

The subject receives unnecessary authority to alter privileged resources or unrelated namespaces. The shortcut creates this risk because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Incorrect Answers

B:

That outcome concerns the distinct objective “Instrument services with OpenTelemetry context propagation”; it is not the most direct consequence of this shortcut. The relevant consequence is that the subject receives unnecessary authority to alter privileged resources or unrelated namespaces.

C:

That outcome concerns the distinct objective “Use Pod Security Standards to deny overly privileged Pod configurations”; it is not the most direct consequence of this shortcut. The relevant consequence is that the subject receives unnecessary authority to alter privileged resources or unrelated namespaces.

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 subject receives unnecessary authority to alter privileged resources or unrelated namespaces.

Question 525

A university lets course assistants inspect one lab namespace without editing network policies. Which implementation together with matching acceptance evidence best meets this case?

  1. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Acceptance evidence: Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.
  2. 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.
  3. Verify that the installed Container Storage Interface driver supports the requested persistent storage and inspect driver controller/node components when mounting fails. Acceptance evidence: Inspect CSI driver registration, test provisioning a claim and review attachment/mount Events for a synthetic workload.
  4. Use a ClusterRole for cluster-scoped resources or reusable rule definitions, recognizing that a RoleBinding to a ClusterRole grants those rules only in one namespace for namespaced resources. Acceptance evidence: Bind a synthetic ClusterRole through RoleBinding in namespace-a, then verify access fails in namespace-b.

Explanation

Correct Answer

A:

Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Acceptance evidence: Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace. This pairing is justified because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Incorrect Answers

B:

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 create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Its confirming test is to use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

C:

This action and check address the distinct objective “Understand CSI drivers and volume attachment responsibilities” instead of the stated acceptance requirement. The matching action is to create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Its confirming test is to use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

D:

This action and check address the distinct objective “Distinguish ClusterRoles from Roles and binding scope” instead of the stated acceptance requirement. The matching action is to create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Its confirming test is to use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Question 526

A charity wants monitoring staff to read Deployment status but not view private Secret objects. 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. Follow a project's published governance, issue templates, contributor guides and code of conduct when reporting bugs or proposing changes.
  3. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace.
  4. Use a ClusterRole for cluster-scoped resources or reusable rule definitions, recognizing that a RoleBinding to a ClusterRole grants those rules only in one namespace for namespaced resources.

Explanation

Correct Answer

C:

The situation is that a charity wants monitoring staff to read Deployment status but not view private Secret objects. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. This resolves the issue because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate. To verify, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

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, RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

B:

This option addresses the distinct objective “Use open community governance and contribution processes for sustainable cloud-native projects”, not the immediate requirement. Open-source community processes provide transparent review and shared maintenance, but do not imply unreviewed external code should be merged into production. For the stated case, RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

D:

This option addresses the distinct objective “Distinguish ClusterRoles from Roles and binding scope”, not the immediate requirement. ClusterRole defines permissions while ClusterRoleBinding makes them cluster-wide; RoleBinding limits effective namespaced scope even when referencing a ClusterRole. For the stated case, RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Question 527

A charity wants monitoring staff to read Deployment status but not view private Secret objects. Which platform mechanism explains why the suitable approach works?

  1. Pod Security Standards establish common workload hardening profiles, and admission checks can enforce restricted capabilities and privilege use at API creation.
  2. RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.
  3. A DaemonSet controller targets eligible nodes for a Pod each, adapting to node additions and labels rather than maintaining a global arbitrary replica count.
  4. StatefulSet manages stable ordinal identities and preserves PVC-associated storage per replica across routine Pod replacement, subject to retention policy.

Explanation

Correct Answer

B:

The situation is that a charity wants monitoring staff to read Deployment status but not view private Secret objects. RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate. It supports this action: Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. To confirm, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Incorrect Answers

A:

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 RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

C:

That statement explains the distinct objective “Select DaemonSet for node-local agents rather than Deployment replica counts” rather than the cause in this case. The deciding mechanism here is that RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

D:

That statement explains the distinct objective “Use StatefulSet for stable ordinal identity and persistent per-replica claims” rather than the cause in this case. The deciding mechanism here is that RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Question 528

A charity wants monitoring staff to read Deployment status but not view private Secret objects. Which controlled observation would best validate the intended improvement?

  1. With synthetic users verify a trusted API connection, denied privilege escalation and appropriate audit entries for failed requests.
  2. Reproduce a missing PVC in a test namespace and confirm the Pod Events directly indicate the unavailable claim.
  3. Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.
  4. Run helm template with staging values, inspect the generated Deployment and Service, and compare a revision's upgrade history.

Explanation

Correct Answer

C:

The situation is that a charity wants monitoring staff to read Deployment status but not view private Secret objects. Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace. This is the relevant test because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Incorrect Answers

A:

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, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

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, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

D:

This check would help evaluate the distinct objective “Use Helm charts for parameterized application packages without equating them to cluster controllers”, but not the required result. For this case, use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Question 529

A charity wants monitoring staff to read Deployment status but not view private Secret objects. An engineer proposes: “Grant cluster-admin to a log reader because kubectl describe initially returns a forbidden error.” What adverse outcome would be most direct?

  1. The route remains nonfunctional because nothing reconciles it into an application traffic proxy.
  2. Dangerous existing configuration may persist because admission is not a universal replacement for every security control.
  3. The subject receives unnecessary authority to alter privileged resources or unrelated namespaces.
  4. The planned maintenance causes avoidable downtime because no safe application replica remains available.

Explanation

Correct Answer

C:

The situation is that a charity wants monitoring staff to read Deployment status but not view private Secret objects. The subject receives unnecessary authority to alter privileged resources or unrelated namespaces. The shortcut creates this risk because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Incorrect Answers

A:

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 the subject receives unnecessary authority to alter privileged resources or unrelated namespaces.

B:

The situation is that a charity wants monitoring staff to read Deployment status but not view private Secret objects. That outcome concerns the distinct objective “Use Pod Security Standards to deny overly privileged Pod configurations”; it is not the most direct consequence of this shortcut. The relevant consequence is that the subject receives unnecessary authority to alter privileged resources or unrelated namespaces.

D:

That outcome concerns the distinct objective “Use cordon and drain with disruption considerations for planned node maintenance”; it is not the most direct consequence of this shortcut. The relevant consequence is that the subject receives unnecessary authority to alter privileged resources or unrelated namespaces.

Question 530

A charity wants monitoring staff to read Deployment status but not view private Secret objects. What pair of supported action and practical verification should be approved?

  1. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Acceptance evidence: Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.
  2. Give each Pod an appropriate ServiceAccount, disable automountServiceAccountToken where API access is unnecessary and test token audience and role scope. Acceptance evidence: Run a test web Pod without a token mount and verify service operation succeeds while in-cluster API calls are unavailable.
  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. Recognize Kubernetes for orchestration, Prometheus for metrics, Envoy for data-plane proxying and Fluentd for log collection in the cloud-native landscape. Acceptance evidence: Build a study architecture diagram that connects each tool to its documented function and verify the expected data flow in a sample environment.

Explanation

Correct Answer

A:

The situation is that a charity wants monitoring staff to read Deployment status but not view private Secret objects. Create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Acceptance evidence: Use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace. This pairing is justified because RBAC evaluates API verbs, resources and scope; a Role is namespaced and does not grant cluster-wide access merely because the subject can authenticate.

Incorrect Answers

B:

This action and check address the distinct objective “Enforce workload service account token boundaries and avoid needless mounts” instead of the stated acceptance requirement. The matching action is to create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Its confirming test is to use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

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 create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Its confirming test is to use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

D:

This action and check address the distinct objective “Identify CNCF ecosystem projects by their role rather than assuming all are Kubernetes core” instead of the stated acceptance requirement. The matching action is to create a Role with only required verbs and resource types, and bind it to the intended subject within the target namespace. Its confirming test is to use kubectl auth can-i --as a synthetic student to verify pod get allowed and secret delete denied in the specified namespace.

Kubernetes and Cloud Native Associate (KCNA) Practice Tests