CNCF CKA Practice Test 30
Question 290
An operations team tests its response to this finding: A legacy client needs repeated requests to tend to the same Pod behind one Service. Which outcome most clearly establishes that the fix worked?
- Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
- Ready endpoints include all healthy replicas and service requests balance accordingly.
- DNS resolves the desired Service from other namespaces.
- Disallowed outbound connections fail while approved egress stays functional.
Explanation
Correct Answer
A:Repeated traffic from one source IP is directed consistently while healthy endpoints exist. The corresponding action is: Configure Service sessionAffinity ClientIP when its limitations are acceptable.
Incorrect Answers
B:Ready endpoints include all healthy replicas and service requests balance accordingly. This is evidence for a separate case (Traffic reaches only one replica because two backend Pods have failing readiness.), not for the target problem. An appropriate validation would be: Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
C:DNS resolves the desired Service from other namespaces. This is evidence for a separate case (A Pod in payments namespace cannot resolve the short name api for a Service in catalog namespace.), not for the target problem. An appropriate validation would be: Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
D:Disallowed outbound connections fail while approved egress stays functional. This is evidence for a separate case (A team thinks applying an ingress-only policy prevents Pods from sending outbound traffic.), not for the target problem. An appropriate validation would be: Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
Question 291
Following this Kubernetes scenario, an operator validates remediation: An HTTPRoute is not serving traffic and its status reports ResolvedRefs False. Which measurable outcome shows success?
- The HTTPRoute reference resolves and accepted traffic reaches intended backends.
- kubectl top nodes and kubectl top pods return current resource metrics.
- The filesystem mounts and the Pod transitions to Running.
- kubectl authenticates using current trust without insecure TLS bypass.
Explanation
Correct Answer
A:The HTTPRoute reference resolves and accepted traffic reaches intended backends. The corresponding action is: Correct the invalid backend Service reference or required cross-namespace ReferenceGrant.
Incorrect Answers
B:Kubectl top nodes and kubectl top pods return current resource metrics. This is evidence for a separate case (kubectl top nodes fails with Metrics API not available.), not for the target problem. An appropriate validation would be: The HTTPRoute reference resolves and accepted traffic reaches intended backends.
C:The filesystem mounts and the Pod transitions to Running. This is evidence for a separate case (A Pod remains ContainerCreating with MountVolume.SetUp failed errors.), not for the target problem. An appropriate validation would be: The HTTPRoute reference resolves and accepted traffic reaches intended backends.
D:Kubectl authenticates using current trust without insecure TLS bypass. This is evidence for a separate case (kubectl reports x509 certificate expired after months of successful access.), not for the target problem. An appropriate validation would be: The HTTPRoute reference resolves and accepted traffic reaches intended backends.
Question 292
Consider the following Kubernetes administration case: A new worker cannot join because its bootstrap token has expired. Which principle BEST explains the intended solution?
- kubeadm join uses bootstrap discovery and credentials that can expire.
- Labels are selectors and must reflect real intended node attributes.
- Declarative bootstrap configuration reduces drift and makes cluster setup reproducible.
- etcd contains cluster state and needs tested, consistent backups.
Explanation
Correct Answer
A:Kubeadm join uses bootstrap discovery and credentials that can expire. This principle explains the targeted result. A concrete response is: Create a valid short-lived kubeadm token and issue a fresh join command using trusted discovery details.
Incorrect Answers
B:Labels are selectors and must reflect real intended node attributes. This principle is useful for another case (Node role labels are inconsistent after provisioning new workers.), but does not explain the most direct solution here. The governing consideration is: kubeadm join uses bootstrap discovery and credentials that can expire.
C:This principle is useful for another case (A cluster bootstrap script contains changing flags and has become difficult to audit.), but does not explain the most direct solution here. Kubeadm join uses bootstrap discovery and credentials that can expire.
D:Etcd contains cluster state and needs tested, consistent backups. This principle is useful for another case (A stacked-etcd control plane needs a recoverable snapshot before upgrade.), but does not explain the most direct solution here. The governing consideration is: kubeadm join uses bootstrap discovery and credentials that can expire.
Question 293
To avoid guessing about this fault, what should be inspected first? StatefulSet peers must discover individual Pod DNS records rather than one virtual Service IP.
- Inspect clusterIP None and query the peer service DNS from a Pod.
- Inspect Service spec.ipFamilies and ipFamilyPolicy and test both family paths.
- Compare kubectl get svc -o yaml selector to kubectl get pods --show-labels.
- Inspect kubectl get endpointslice -l kubernetes.io/service-name=api -o yaml.
Explanation
Correct Answer
A:Inspect clusterIP None and query the peer service DNS from a Pod. This diagnostic examines the relevant resource or subsystem. Headless Services expose endpoint DNS without allocating a virtual ClusterIP. The validating result would be: DNS returns individual eligible Pod endpoint addresses and stable peer identities.
Incorrect Answers
B:This check is appropriate to the separate problem (A dual-stack cluster Service was created with only IPv4 despite an IPv6 requirement.), but it is not the direct diagnostic for the described failure. Inspect clusterIP None and query the peer service DNS from a Pod.
C:This check is appropriate to the separate problem (A Service exists but its EndpointSlice contains no addresses even though backend Pods are running.), but it is not the direct diagnostic for the described failure.
D:This check is appropriate to the separate problem (Traffic reaches only one replica because two backend Pods have failing readiness.), but it is not the direct diagnostic for the described failure. Inspect clusterIP None and query the peer service DNS from a Pod.
Question 294
An engineer needs to justify a change for this issue: Two StatefulSet replicas accidentally share one manually named PVC and interfere with each other. Which technical reason is MOST relevant?
- CSI attachment and mounting rely on healthy controller and node components.
- Retain preserves data resources for explicit lifecycle handling after claim deletion.
- ReadWriteOnce generally constrains mounting read-write to one node, not universally to one Pod.
- StatefulSet claim templates provision stable volumes associated with ordinal identities.
Explanation
Correct Answer
D:StatefulSet claim templates provision stable volumes associated with ordinal identities. This principle explains the targeted result. A concrete response is: Use StatefulSet volumeClaimTemplates for per-replica persistent storage.
Incorrect Answers
A:This principle is useful for another case (A Pod is stuck ContainerCreating due to an attach timeout from a cloud block volume.), but does not explain the most direct solution here. StatefulSet claim templates provision stable volumes associated with ordinal identities.
B:This principle is useful for another case (A StatefulSet is decommissioned but its underlying audit volume must remain for investigation.), but does not explain the most direct solution here. StatefulSet claim templates provision stable volumes associated with ordinal identities.
C:This principle is useful for another case (Two Pods on different nodes try to attach the same RWO block volume and one remains Pending.), but does not explain the most direct solution here. StatefulSet claim templates provision stable volumes associated with ordinal identities.
Question 295
A cluster administrator must address the following case: An operator wants temporary access to an internal Pod without publishing a public Service. Select TWO appropriate statements, one corrective action and one observable outcome.
- Remediation: Change the Service to LoadBalancer solely to inspect a health endpoint once.
- Remediation: Inspect Service routing implementation, kube-proxy or equivalent dataplane, and endpoint health.
- Validation: The route resolves the backend reference without opening unrelated namespace access.
- Remediation: Use kubectl port-forward to an appropriate Pod or Service for authorized short-lived access.
- Validation: The operator can test the local forwarded port and no permanent external Service is created.
Explanation
Correct Answers
D:Remediation: Use kubectl port-forward to an appropriate Pod or Service for authorized short-lived access. The remedy targets the reported failure rather than a different subsystem. Port forwarding is a debugging tunnel, not an internet-facing production endpoint.
E:Validation: The operator can test the local forwarded port and no permanent external Service is created. This result verifies the behavior the remediation is supposed to restore.
Incorrect Answers
A:Remediation: Change the Service to LoadBalancer solely to inspect a health endpoint once. This is the unsafe shortcut for the case, not an acceptable intervention. Port forwarding is a debugging tunnel, not an internet-facing production endpoint.
B:Remediation: Inspect Service routing implementation, kube-proxy or equivalent dataplane, and endpoint health. This action targets a different condition (A Service virtual IP fails although direct Pod IP connectivity works.), not this reported failure: An operator wants temporary access to an internal Pod without publishing a public Service.
C:Validation: The route resolves the backend reference without opening unrelated namespace access. This evidence applies to a different condition (A Gateway API route in namespace web needs to refer to a backend Service in namespace shared.), and would not verify this target fix: An operator wants temporary access to an internal Pod without publishing a public Service.
Question 296
In a Kubernetes cluster, the following condition is observed: A namespace user can list Pods in dev but receives Forbidden in prod. Which remediation MOST directly addresses it?
- Use targeted kube-system Pod descriptions and component logs to locate its failure before edits.
- Create a namespaced Role and RoleBinding in prod granting only required pod verbs to the user or group.
- Confirm the Kubernetes and kubelet swap configuration and align host swap handling with supported policy.
- Bind a narrowly scoped Role to the controller ServiceAccount in team-a.
Explanation
Correct Answer
B:A successful result is: An authorization check succeeds for the approved pod operation in prod and remains denied elsewhere.
Incorrect Answers
A:This procedure belongs to a different Kubernetes condition (A new control-plane component does not appear ready after a manifest update.). Use targeted kube-system Pod descriptions and component logs to locate its failure before edits.
C:Confirm the Kubernetes and kubelet swap configuration and align host swap handling with supported policy. This procedure belongs to a different Kubernetes condition (An intended kubeadm worker reports kubelet swap-related startup failures.). It does not directly resolve the observed failure. The targeted action is: Create a namespaced Role and RoleBinding in prod granting only required pod verbs to the user or group.
D:Bind a narrowly scoped Role to the controller ServiceAccount in team-a. This procedure belongs to a different Kubernetes condition (A controller ServiceAccount needs to read ConfigMaps only in team-a.). It does not directly resolve the observed failure. The targeted action is: Create a namespaced Role and RoleBinding in prod granting only required pod verbs to the user or group.
Question 297
Select THREE technically appropriate statements spanning action, explanation and expected result for this case: Egress-isolated Pods cannot resolve DNS even though their app traffic policy is correct.
- Explanation: Egress policies must allow necessary dependency traffic such as DNS.
- Remediation: Remove all egress restrictions just to restore name resolution.
- Remediation: Add a narrowly scoped egress allowance for DNS UDP/TCP 53 to the intended resolver endpoints.
- Validation: DNS queries succeed while other disallowed egress remains denied.
- Remediation: Inspect CoreDNS forward configuration, upstream resolver reachability and network policies.
- Validation: Controlled deny tests actually prevent prohibited Pod connections.
Explanation
Correct Answers
A:Explanation: Egress policies must allow necessary dependency traffic such as DNS. This is the technical mechanism supporting the recommended operation.
C:Remediation: Add a narrowly scoped egress allowance for DNS UDP/TCP 53 to the intended resolver endpoints. The remedy targets the reported failure rather than a different subsystem. Egress policies must allow necessary dependency traffic such as DNS.
D:Validation: DNS queries succeed while other disallowed egress remains denied. This result verifies the behavior the remediation is supposed to restore.
Incorrect Answers
B:Remediation: Remove all egress restrictions just to restore name resolution. This is the unsafe shortcut for the case, not an acceptable intervention. Egress policies must allow necessary dependency traffic such as DNS.
E:Remediation: Inspect CoreDNS forward configuration, upstream resolver reachability and network policies. This action targets a different condition (Internal Service names resolve but Pods cannot resolve public domains through CoreDNS.), not this reported failure: Egress-isolated Pods cannot resolve DNS even though their app traffic policy is correct.
F:Validation: Controlled deny tests actually prevent prohibited Pod connections. This evidence applies to a different condition (NetworkPolicy objects are accepted but all supposedly blocked traffic is still allowed.), and would not verify this target fix: Egress-isolated Pods cannot resolve DNS even though their app traffic policy is correct.
Question 298
Consider the following Kubernetes administration case: An app container restarts so quickly that current kubectl logs show only its latest attempt. Which principle BEST explains the intended solution?
- Service routing depends on node dataplane health distinct from Pod connectivity.
- Persistent storage binding can be a prerequisite for Pod placement.
- Resource pressure investigation requires measured utilization and scheduler reservation context.
- Current container output can omit the earlier process that caused CrashLoopBackOff.
Explanation
Correct Answer
D:Current container output can omit the earlier process that caused CrashLoopBackOff. This principle explains the targeted result. A concrete response is: Read the prior container instance logs using the --previous option.
Incorrect Answers
A:This principle is useful for another case (Service ClusterIP connections fail on one node even though direct Pod IP connections work.), but does not explain the most direct solution here. Current container output can omit the earlier process that caused CrashLoopBackOff.
B:This principle is useful for another case (A Pod is Pending with a message about unbound immediate PersistentVolumeClaims.), but does not explain the most direct solution here. Current container output can omit the earlier process that caused CrashLoopBackOff.
C:This principle is useful for another case (A node reports high CPU use and latency spikes while the scheduler keeps assigning Pods.), but does not explain the most direct solution here. Current container output can omit the earlier process that caused CrashLoopBackOff.
Question 299
An administrator is investigating this situation: A legacy client needs repeated requests to tend to the same Pod behind one Service. Which action BEST resolves the underlying issue?
- Configure Service sessionAffinity ClientIP when its limitations are acceptable.
- Use a LoadBalancer Service backed by a working provider integration.
- Evaluate externalTrafficPolicy Local and ensure healthy local endpoints on receiving nodes.
- Add a narrowly scoped egress allowance for DNS UDP/TCP 53 to the intended resolver endpoints.
Explanation
Correct Answer
A:Configure Service sessionAffinity ClientIP when its limitations are acceptable. This correction targets the specific failure. Service affinity can be source-IP based but is not a durable application session store. A successful result is: Repeated traffic from one source IP is directed consistently while healthy endpoints exist.
Incorrect Answers
B:Use a LoadBalancer Service backed by a working provider integration. This procedure belongs to a different Kubernetes condition (An external HTTP service needs an infrastructure-managed public listener.). It does not directly resolve the observed failure. The targeted action is: Configure Service sessionAffinity ClientIP when its limitations are acceptable.
C:Evaluate externalTrafficPolicy Local and ensure healthy local endpoints on receiving nodes. This procedure belongs to a different Kubernetes condition (A team needs clients' original source IP preserved for a LoadBalancer Service.). It does not directly resolve the observed failure. The targeted action is: Configure Service sessionAffinity ClientIP when its limitations are acceptable.
D:Add a narrowly scoped egress allowance for DNS UDP/TCP 53 to the intended resolver endpoints. This procedure belongs to a different Kubernetes condition (Egress-isolated Pods cannot resolve DNS even though their app traffic policy is correct.). It does not directly resolve the observed failure. The targeted action is: Configure Service sessionAffinity ClientIP when its limitations are acceptable.
Question 300
Consider the following Kubernetes administration case: A container enters CrashLoopBackOff and lastState terminated reason is OOMKilled. Which principle BEST explains the intended solution?
- Node authorization depends on valid client identity and trusted CA chain.
- Exceeding a memory limit can cause OOM termination and repeated restarts.
- NetworkPolicies are additive allow lists once isolation applies.
- TLS validation requires matching server identity and trusted certificate chain.
Explanation
Correct Answer
B:Exceeding a memory limit can cause OOM termination and repeated restarts. This principle explains the targeted result. A concrete response is: Investigate memory consumption and set appropriate requests, limits or fix the application's memory use.
Incorrect Answers
A:This principle is useful for another case (Kubelet logs show TLS certificate errors after a node credential rotation.), but does not explain the most direct solution here. Exceeding a memory limit can cause OOM termination and repeated restarts.
C:NetworkPolicies are additive allow lists once isolation applies. This principle is useful for another case (After a default-deny NetworkPolicy, a required API-to-database connection times out.), but does not explain the most direct solution here. The governing consideration is: Exceeding a memory limit can cause OOM termination and repeated restarts.
D:This principle is useful for another case (A control-plane certificate replacement causes clients to reject the API server.), but does not explain the most direct solution here. Exceeding a memory limit can cause OOM termination and repeated restarts.