CNCF CKA Practice Test 16
Question 150
An administrator reviews several possible responses to this condition: NetworkPolicy objects are accepted but all supposedly blocked traffic is still allowed. Which option creates an avoidable failure?
- Assume API acceptance proves packet filtering is active.
- Validate a change with a repeatable positive and negative test.
- Review controller logs and resource status to understand reconciliation failures.
- Apply scoped access rather than granting universal administration.
Explanation
Correct Answer
A:Assume API acceptance proves packet filtering is active. The NetworkPolicy API requires a network plugin that enforces policies. A safer course is: Confirm the installed CNI implements policy enforcement and configure a supported policy-capable plugin.
Incorrect Answers
B:Validate a change with a repeatable positive and negative test. A testable outcome provides stronger evidence than intent alone. For the stated case, a focused correction is: Confirm the installed CNI implements policy enforcement and configure a supported policy-capable plugin.
C:Review controller logs and resource status to understand reconciliation failures. Controller evidence can distinguish desired state from observed failure. For the stated case, a focused correction is: Confirm the installed CNI implements policy enforcement and configure a supported policy-capable plugin.
D:Apply scoped access rather than granting universal administration. Least privilege limits accidental or excessive authority. For the stated case, a focused correction is: Confirm the installed CNI implements policy enforcement and configure a supported policy-capable plugin.
Question 151
A review finds this Kubernetes issue: A storage consumer expects a raw block device but the PVC is provisioned with volumeMode Filesystem. Which suggestion would make troubleshooting or security worse?
- Keep backups or change history for potentially destructive maintenance.
- Mount a raw device as a regular ConfigMap volume.
- Use a staged rollout and observe readiness before full deployment.
- Confirm actual node conditions and allocatable resources before scheduling changes.
Explanation
Correct Answer
B:Mount a raw device as a regular ConfigMap volume. Volume mode differentiates raw block devices from filesystem mounts. A safer course is: Configure compatible PVC and PV volumeMode Block and Pod volumeDevices when supported.
Incorrect Answers
A:Keep backups or change history for potentially destructive maintenance. Recovery planning reduces the impact of a faulty change. For the stated case, a focused correction is: Configure compatible PVC and PV volumeMode Block and Pod volumeDevices when supported.
C:Use a staged rollout and observe readiness before full deployment. Staged changes reduce simultaneous loss of healthy replicas. For the stated case, a focused correction is: Configure compatible PVC and PV volumeMode Block and Pod volumeDevices when supported.
D:Confirm actual node conditions and allocatable resources before scheduling changes. Scheduler behavior must be assessed against real node constraints. For the stated case, a focused correction is: Configure compatible PVC and PV volumeMode Block and Pod volumeDevices when supported.
Question 152
A CKA learner must investigate the following: A CNI plugin fails to allocate Pod addresses as a node's Pod CIDR fills. Which command or check supplies the MOST direct diagnostic evidence?
- Use kubectl logs -n app deployment/web --all-containers=true --timestamps.
- Inspect CNI IPAM errors and allocated Pod CIDRs or address pools.
- Run etcdctl endpoint health and endpoint status with appropriate TLS credentials.
- Use kubectl get events -n app --sort-by=.metadata.creationTimestamp with describe and timestamped logs.
Explanation
Correct Answer
B:Inspect CNI IPAM errors and allocated Pod CIDRs or address pools. This diagnostic examines the relevant resource or subsystem. Pod address exhaustion can block container networking despite healthy kubelet. The validating result would be: New Pods obtain unique Pod IPs without collision after capacity remediation.
Incorrect Answers
A:This check is appropriate to the separate problem (An app writes errors to stderr but a team searches only a file in the container image.), but it is not the direct diagnostic for the described failure. Inspect CNI IPAM errors and allocated Pod CIDRs or address pools.
C:This check is appropriate to the separate problem (The API server is slow and logs show etcd request timeouts.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (An incident responder sees Pod recreation, image pull and readiness failures and needs the order of events.), but it is not the direct diagnostic for the described failure. Inspect CNI IPAM errors and allocated Pod CIDRs or address pools.
Question 153
A Kubernetes operator wants to verify this condition: Each worker needs exactly one log-collector Pod when nodes are added. Which investigation step is BEST suited to the case?
- Inspect kubectl get daemonset -o wide and compare desiredNumberScheduled to available nodes.
- Inspect kubectl describe pod readiness events and kubectl get endpointslices.
- Inspect kubectl describe node Taints and Pod spec tolerations with scheduling events.
- Inspect Pod initContainerStatuses and events for initialization sequencing.
Explanation
Correct Answer
A:Inspect kubectl get daemonset -o wide and compare desiredNumberScheduled to available nodes. This diagnostic examines the relevant resource or subsystem. DaemonSets reconcile per-node agent placement rather than a fixed total replica count. The validating result would be: A collector runs on each eligible node including newly joined nodes.
Incorrect Answers
B:This check is appropriate to the separate problem (A container is running but cannot serve requests until a cache is primed.), but it is not the direct diagnostic for the described failure. Inspect kubectl get daemonset -o wide and compare desiredNumberScheduled to available nodes.
C:This check is appropriate to the separate problem (A special node has NoSchedule taint and a permitted Pod remains Pending.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (An application fails because its database initialization must happen before the main process.), but it is not the direct diagnostic for the described failure. Inspect kubectl get daemonset -o wide and compare desiredNumberScheduled to available nodes.
Question 154
To avoid guessing about this fault, what should be inspected first? Service ClusterIP connections fail on one node even though direct Pod IP connections work.
- Run kubectl config current-context and kubectl config view --minify.
- Trace connection from a test Pod and inspect host egress NAT and route tables.
- Compare ClusterIP and direct Pod tests from affected and healthy nodes.
- Inspect kubectl get httproute -o yaml status.parents conditions and backend refs.
Explanation
Correct Answer
C:Compare ClusterIP and direct Pod tests from affected and healthy nodes. This diagnostic examines the relevant resource or subsystem. Service routing depends on node dataplane health distinct from Pod connectivity. The validating result would be: ClusterIP routing recovers without changing application code or Pod IPs.
Incorrect Answers
A:This check is appropriate to the separate problem (kubectl suddenly reports connection refused after the team changed contexts.), but it is not the direct diagnostic for the described failure. Compare ClusterIP and direct Pod tests from affected and healthy nodes.
B:This check is appropriate to the separate problem (Pods reach cluster Services but cannot contact external APIs from private node networks.), but it is not the direct diagnostic for the described failure. Compare ClusterIP and direct Pod tests from affected and healthy nodes.
D:This check is appropriate to the separate problem (An HTTPRoute is not serving traffic and its status reports ResolvedRefs False.), but it is not the direct diagnostic for the described failure. Compare ClusterIP and direct Pod tests from affected and healthy nodes.
Question 155
An engineer reports that this problem was fixed: A kubeadm init uses an advertise address unreachable from joining nodes. What specific result should an independent reviewer expect?
- TLS clients can authenticate after renewal and the control plane is healthy.
- Workers reach the API server and successfully complete the trusted join workflow.
- The running Pod lacks an automatically mounted API token when no Kubernetes API access is needed.
- A permitted node read succeeds and a node mutation is forbidden.
Explanation
Correct Answer
B:Workers reach the API server and successfully complete the trusted join workflow. The corresponding action is: Align the node advertise address and stable control-plane endpoint with reachable network interfaces.
Incorrect Answers
A:TLS clients can authenticate after renewal and the control plane is healthy. This is evidence for a separate case (An API client certificate is about to expire on a kubeadm managed control plane.), not for the target problem. An appropriate validation would be: Workers reach the API server and successfully complete the trusted join workflow.
C:The running Pod lacks an automatically mounted API token when no Kubernetes API access is needed. This is evidence for a separate case (A Pod in test is unintentionally accessing the API with its default ServiceAccount.), not for the target problem. An appropriate validation would be: Workers reach the API server and successfully complete the trusted join workflow.
D:A permitted node read succeeds and a node mutation is forbidden. This is evidence for a separate case (A monitoring integration needs cluster-wide read-only node information.), not for the target problem. An appropriate validation would be: Workers reach the API server and successfully complete the trusted join workflow.
Question 156
An engineer reports that this problem was fixed: The control plane is upgraded but one worker still runs an older supported kubelet. What specific result should an independent reviewer expect?
- The worker rejoins Ready with the approved kubelet version and scheduled workloads recover.
- kubectl and joining nodes remain able to reach the API when one control-plane node fails.
- etcd regains a healthy majority and API writes succeed without divergent state.
- The kubelet starts with an explicitly supported swap setting and the node registers normally.
Explanation
Correct Answer
A:The worker rejoins Ready with the approved kubelet version and scheduled workloads recover. The corresponding action is: Drain the worker, upgrade kubeadm and kubelet components appropriately, then uncordon after validation.
Incorrect Answers
B:Kubectl and joining nodes remain able to reach the API when one control-plane node fails. This is evidence for a separate case (Two API servers run but workloads use one control-plane node IP as the endpoint.), not for the target problem. An appropriate validation would be: The worker rejoins Ready with the approved kubelet version and scheduled workloads recover.
C:Etcd regains a healthy majority and API writes succeed without divergent state. This is evidence for a separate case (A stacked-etcd cluster has lost quorum after too many control-plane failures.), not for the target problem. An appropriate validation would be: The worker rejoins Ready with the approved kubelet version and scheduled workloads recover.
D:The kubelet starts with an explicitly supported swap setting and the node registers normally. This is evidence for a separate case (An intended kubeadm worker reports kubelet swap-related startup failures.), not for the target problem. An appropriate validation would be: The worker rejoins Ready with the approved kubelet version and scheduled workloads recover.
Question 157
A CKA learner must investigate the following: Pods on two different workers cannot reach one another but Pod traffic works within a node. Which command or check supplies the MOST direct diagnostic evidence?
- Compare direct Pod and ClusterIP curl tests and inspect kube-proxy logs where applicable.
- Inspect kubectl get gatewayclass,gateway,httproute -o yaml conditions and controller logs.
- Test connectivity between Pod IPs on distinct nodes and inspect CNI DaemonSet logs.
- Inspect Gateway listeners and TLS Secret in the certificate reference namespace.
Explanation
Correct Answer
C:Test connectivity between Pod IPs on distinct nodes and inspect CNI DaemonSet logs. This diagnostic examines the relevant resource or subsystem. Cluster networking requires a functioning CNI path between Pod address ranges. The validating result would be: Cross-node Pod-to-Pod communication succeeds without using host network mode.
Incorrect Answers
A:This check is appropriate to the separate problem (A Service virtual IP fails although direct Pod IP connectivity works.), but it is not the direct diagnostic for the described failure. Test connectivity between Pod IPs on distinct nodes and inspect CNI DaemonSet logs.
B:This check is appropriate to the separate problem (An HTTPRoute cannot bind because its parent GatewayClass has no controller managing it.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (A Gateway HTTPS listener reports invalid certificate references.), but it is not the direct diagnostic for the described failure. Test connectivity between Pod IPs on distinct nodes and inspect CNI DaemonSet logs.
Question 158
An administrator is investigating this situation: Pod connections work on one node but fail only when destination Pods are on another worker. Which action BEST resolves the underlying issue?
- Allow required DNS egress to the cluster resolver while retaining intended isolation.
- Recover kubelet service after inspecting its systemd journal and configuration.
- Measure node and Pod CPU usage and correlate resource requests with workload demand before adjusting capacity.
- Check inter-node routes, CNI encapsulation and firewall rules for Pod CIDR traffic.
Explanation
Correct Answer
D:Check inter-node routes, CNI encapsulation and firewall rules for Pod CIDR traffic. This correction targets the specific failure. Cluster networking requires an end-to-end dataplane across worker hosts. A successful result is: Cross-node Pod-to-Pod packets succeed both directions.
Incorrect Answers
A:This procedure belongs to a different Kubernetes condition (Only Pods selected by a new egress policy fail DNS while other Pods resolve normally.). Allow required DNS egress to the cluster resolver while retaining intended isolation.
B:This procedure belongs to a different Kubernetes condition (All Pods on one node disappear from monitoring after kubelet service stops.). Recover kubelet service after inspecting its systemd journal and configuration.
C:Measure node and Pod CPU usage and correlate resource requests with workload demand before adjusting capacity.
Question 159
Following this Kubernetes scenario, an operator validates remediation: kubectl top nodes fails with Metrics API not available. Which measurable outcome shows success?
- kubectl top nodes and kubectl top pods return current resource metrics.
- The identified workload and node saturation explain latency and a targeted capacity change restores headroom.
- Only the approved API-to-database traffic succeeds under policy enforcement.
- The investigation identifies the first failed networking layer and a targeted fix restores connectivity.
Explanation
Correct Answer
A:Kubectl top nodes and kubectl top pods return current resource metrics. The corresponding action is: Recover the supported metrics-server installation and its APIService registration.
Incorrect Answers
B:The identified workload and node saturation explain latency and a targeted capacity change restores headroom. This is evidence for a separate case (A node reports high CPU use and latency spikes while the scheduler keeps assigning Pods.), not for the target problem. An appropriate validation would be: kubectl top nodes and kubectl top pods return current resource metrics.
C:Only the approved API-to-database traffic succeeds under policy enforcement. This is evidence for a separate case (After a default-deny NetworkPolicy, a required API-to-database connection times out.), not for the target problem. An appropriate validation would be: kubectl top nodes and kubectl top pods return current resource metrics.
D:The investigation identifies the first failed networking layer and a targeted fix restores connectivity. This is evidence for a separate case (An app cannot reach a database and the error is a TCP timeout, not DNS NXDOMAIN.), not for the target problem. An appropriate validation would be: kubectl top nodes and kubectl top pods return current resource metrics.
Question 160
During cluster maintenance, an engineer finds this problem: An HTTPRoute is not serving traffic and its status reports ResolvedRefs False. Which next action is technically justified?
- Recover kubelet service after inspecting its systemd journal and configuration.
- Correct the invalid backend Service reference or required cross-namespace ReferenceGrant.
- Inspect alarms and backend size, compact and defragment safely as documented, and restore capacity.
- Compare resource requests against node allocatable rather than only live CPU utilization.
Explanation
Correct Answer
B:Correct the invalid backend Service reference or required cross-namespace ReferenceGrant. This correction targets the specific failure. Gateway API status conditions identify invalid reference wiring. A successful result is: The HTTPRoute reference resolves and accepted traffic reaches intended backends.
Incorrect Answers
A:Recover kubelet service after inspecting its systemd journal and configuration. This procedure belongs to a different Kubernetes condition (All Pods on one node disappear from monitoring after kubelet service stops.). It does not directly resolve the observed failure. The targeted action is: Correct the invalid backend Service reference or required cross-namespace ReferenceGrant.
C:This procedure belongs to a different Kubernetes condition (etcd returns a no-space alarm after excessive database growth.). Inspect alarms and backend size, compact and defragment safely as documented, and restore capacity.
D:This procedure belongs to a different Kubernetes condition (A node appears idle by CPU usage but a new Pod is unschedulable with Insufficient cpu.). Compare resource requests against node allocatable rather than only live CPU utilization.