# Free KO practice questions

> 10 free KO practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/kubernetes-operations/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/kubernetes-operations/

### Question 1 of 10

A platform team runs a self-managed kubeadm cluster on Kubernetes 1.33 with three control-plane nodes. Security policy now requires 1.35 before the end of the quarter, and the team wants to stay within the supported upgrade path. Which plan should the team follow?

- A. Build a fresh 1.35 control plane next to the old one and restore a 1.33 etcd snapshot into it, which lets the cluster skip the intermediate 1.34 release.
- B. Run kubeadm upgrade apply v1.35.x directly on the first control-plane node, because kubeadm migrates static Pod manifests across two minor versions in one pass.
- C. Upgrade every worker kubelet to 1.35 first so the nodes are ready before the API server moves, and then jump the control plane straight from 1.33 to 1.35.
- D. Upgrade the control plane to 1.34 and then to 1.35, one minor version per step, and bring kubelets up afterwards while staying inside the supported skew.

**Answer:** D

**Explanation:** Control-plane upgrades must move one minor version at a time, and kubelets follow the control plane because a kubelet may never be newer than the API server. kubeadm refuses to skip a minor version, so a direct 1.33 to 1.35 apply is not supported. Upgrading kubelets first would make them newer than the API server, which breaks the skew policy. Restoring an older etcd snapshot into a newer control plane skips the per-version storage migrations and is not a supported upgrade path.

### Question 2 of 10

A policy webhook with failurePolicy: Fail matches all pod CREATE requests. During node-pool rotation its two replicas were evicted at the same time, and now no pods, including the webhook's own replacements, can be created. Which design prevents this deadlock in future rotations?

- A. Run the webhook as a static pod on every control-plane node, so it is never drained and is always available to the API server.
- B. Exclude kube-system and the webhook's own namespace via a namespaceSelector, and run several webhook replicas under a PDB.
- C. Switch to failurePolicy: Ignore permanently so pod creation always succeeds whenever the webhook is unreachable during any type of maintenance.
- D. Raise the webhook timeoutSeconds to 30 so the API server waits longer for the replacement webhook replicas to become ready again.

**Answer:** B

**Explanation:** Excluding the webhook's own namespace and system namespaces breaks the circular dependency, and a PDB with several replicas prevents losing all instances during drains. Ignoring failures permanently disables the policy whenever the webhook is down, which defeats its purpose. A longer timeout does not help if no webhook pod can ever be created. Static pods are an unusual and hard-to-operate way to run a webhook and do not address the circular match on its own pods.

### Question 3 of 10

Cluster Autoscaler never removes a node that has been under 20% utilisation for days. Its status shows the node cannot be removed because a Deployment pod on it uses an emptyDir volume for cache data that can safely be lost. What is the MOST targeted fix?

- A. Lower --scale-down-utilization-threshold to 0.1, so that nodes with very little requested capacity become candidates for removal sooner.
- B. Assign the Deployment a low-value PriorityClass so the autoscaler treats its pods as preemptible and ignores them when evaluating scale-down.
- C. Create a PodDisruptionBudget with maxUnavailable: 1 for the Deployment so the autoscaler knows that evicting one pod is permitted.
- D. Annotate the pod template with cluster-autoscaler.kubernetes.io/safe-to-evict: "true" so the autoscaler may evict pods with local storage.

**Answer:** D

**Explanation:** Cluster Autoscaler by default will not evict pods that use local storage such as emptyDir, and the safe-to-evict annotation explicitly allows it. The node is already below the utilisation threshold, so lowering it changes nothing. A PDB governs how many pods can be disrupted but does not override the local-storage rule. Priority affects the expendable-pods cutoff only below a configured threshold and is a blunt workaround for this specific blocker.

### Question 4 of 10 (choose 2)

A payments service shares nodes with batch jobs. During memory pressure the kubelet has evicted payment pods, and during busy periods new payment pods wait behind batch pods in the scheduling queue. Which two changes address BOTH problems? (Choose two.)

- A. Give the payment pods a PriorityClass with a higher value than the batch workloads so they schedule first and can preempt them.
- B. Use a nodeSelector that places payment pods on control-plane nodes, which are excluded from kubelet node-pressure eviction.
- C. Set memory and CPU requests equal to limits on every payment container so the pods run in the Guaranteed QoS class.
- D. Add a PodDisruptionBudget with minAvailable: 80% so the kubelet must respect it before evicting payment pods for memory pressure.
- E. Raise terminationGracePeriodSeconds on payment pods to 300 so the kubelet gives them more time before a node-pressure eviction completes.

**Answer:** A, C

**Explanation:** A higher PriorityClass orders the scheduling queue and enables preemption of batch pods, and Guaranteed QoS combined with priority makes payment pods the last candidates for node-pressure eviction. Kubelet node-pressure eviction does not honour PodDisruptionBudgets. A longer grace period does not prevent eviction, and hard eviction thresholds ignore it. Control-plane nodes are not exempt from eviction and should not host application workloads.

### Question 5 of 10

At peak load, a 300-node cluster sees intermittent DNS timeouts. CoreDNS pods are not CPU-bound, but node conntrack tables show many UDP entries for DNS traffic. Which change addresses this with the BEST effect on latency and reliability?

- A. Run CoreDNS with hostNetwork: true on every node so DNS answers no longer cross the overlay network and avoid encapsulation.
- B. Set dnsPolicy: ClusterFirstWithHostNet on all application pods so their DNS queries bypass kube-proxy and go to CoreDNS directly.
- C. Raise the CoreDNS cache TTL to 3600 seconds so that records stay cached for an hour and far fewer queries reach the upstream.
- D. Deploy NodeLocal DNSCache so pods query a caching agent on their own node, cutting cross-node UDP traffic and conntrack entries.

**Answer:** D

**Explanation:** NodeLocal DNSCache answers from a per-node cache and uses TCP upstream, which removes most conntrack pressure and cross-node hops. A one-hour cache TTL risks stale answers and does not reduce the per-query conntrack entries from pods. ClusterFirstWithHostNet is meant for hostNetwork pods and does not bypass the Service path for normal pods. hostNetwork CoreDNS still receives queries through the Service and does not remove conntrack churn.

### Question 6 of 10

To preserve client source IPs, a team set externalTrafficPolicy: Local on a LoadBalancer Service. The cloud load balancer now reports 7 of 10 nodes as unhealthy, although traffic is served correctly. What is the explanation?

- A. The cloud controller manager lost track of the node list during the update, and it will resync the target group after the default sync period.
- B. This is expected: the health check node port only reports healthy on nodes that run a ready endpoint of the Service, so traffic is not sent elsewhere.
- C. Kube-proxy stops programming forwarding rules on nodes that run no local pods, so those nodes drop traffic and the load balancer health probes time out.
- D. The Service's healthCheckNodePort collided with another NodePort Service, and only three nodes kept the original port allocation after the change.

**Answer:** B

**Explanation:** With the Local policy, kube-proxy answers the healthCheckNodePort positively only on nodes hosting a ready endpoint, so the load balancer deliberately avoids nodes that would otherwise drop or double-hop traffic. Kube-proxy still programs rules on every node; the health check is how the load balancer avoids them. Node ports are allocated cluster-wide and do not collide this way. The node list itself has not changed, so a resync would not alter the health status.

### Question 7 of 10

A cluster encrypts Secrets at rest with a local aescbc key defined in an EncryptionConfiguration file. The DR runbook stores daily etcd snapshots offsite. What else must be protected separately for a restored control plane to read the Secrets?

- A. The EncryptionConfiguration file and its key material, stored securely apart from the snapshots so that a restore can decrypt the data.
- B. The kubelet client certificates from every worker node, because the API server uses them to decrypt Secret data for pods.
- C. The ServiceAccount signing key pair only, because Secret values are encrypted with the key used to sign ServiceAccount tokens.
- D. The CoreDNS Corefile and kube-proxy ConfigMap, which hold the cluster-specific configuration that decrypts stored resources.

**Answer:** A

**Explanation:** Secrets in the snapshot are encrypted with the key from the EncryptionConfiguration, so without that key the restored API server cannot read them; it must be backed up securely and separately. Kubelet certificates authenticate nodes and play no part in encryption at rest. ServiceAccount signing keys sign tokens and do not encrypt stored data (though they should be backed up too). CoreDNS and kube-proxy configuration are stored in etcd itself and do not decrypt anything.

### Question 8 of 10

A pod stays Pending with the event 0/8 nodes are available: 3 node(s) had untolerated taint {node.kubernetes.io/unreachable: }, 5 Insufficient memory. What is the correct interpretation?

- A. Three nodes are cordoned for maintenance, and five nodes are running at their memory limits as reported by metrics-server.
- B. Three nodes are reserved for system workloads, and five nodes are experiencing kernel memory pressure and refusing pods.
- C. Three nodes carry a custom taint added by an operator, and five nodes have a memory ResourceQuota that the pod exceeds.
- D. Three nodes lost contact with the control plane and are tainted, and the five healthy nodes lack enough free requested memory.

**Answer:** D

**Explanation:** The unreachable taint is added automatically when the node controller loses contact with a node, and Insufficient memory means requests do not fit allocatable on the rest. Cordoned nodes are reported as unschedulable, not tainted unreachable. Quotas are per namespace and block creation rather than scheduling. Memory pressure appears as a different taint, and the scheduler uses requests, not usage.

### Question 9 of 10

A latency-sensitive service shows p99 spikes. Its average CPU usage is 40% of the CPU limit, yet container_cpu_cfs_throttled_periods_total rises sharply during the spikes. What is the MOST likely cause and fix?

- A. The node is overcommitted on memory and swaps under load, so the team should add memory requests to every pod scheduled on that node.
- B. The CPU request is too high, so the scheduler places the pod on busy nodes; lower the request so it moves to emptier nodes in the pool.
- C. The HPA is scaling too slowly, so each pod runs hot; lower the HPA target utilisation so new replicas start earlier during spikes.
- D. Bursts hit the CFS quota within individual 100 ms periods even though the average is low; raise or remove the CPU limit for this service.

**Answer:** D

**Explanation:** CFS quota is enforced per short period, so bursty workloads get throttled even with low average usage, and raising or removing the CPU limit stops it. The throttling metric points to CPU limits, not memory or swap. A higher request actually reserves more CPU and does not cause throttling. HPA tuning changes replica count but each pod would still be throttled by its own quota.

### Question 10 of 10

A red-team exercise extracted a kubelet's client credentials from one worker node. Which control limits what an attacker can do with those credentials to objects related to that node only?

- A. The Node authorizer combined with the NodeRestriction admission plugin, which scope kubelets to their own node and its pods.
- B. A NetworkPolicy that blocks traffic from the node to the API server, so the stolen credentials cannot be used from that node.
- C. The --anonymous-auth=false kubelet flag, which prevents anyone from using the kubelet's credentials without a password.
- D. The PodSecurity admission controller set to restricted, which blocks kubelets from reading any Secrets in the cluster.

**Answer:** A

**Explanation:** The Node authorizer limits kubelets to reading objects related to pods bound to their node, and NodeRestriction stops them from modifying other nodes or pods. Pod Security admission evaluates pod specs, not kubelet API access. NetworkPolicy does not govern host traffic to the API server in this way, and the credentials work from anywhere. Anonymous auth concerns access to the kubelet's own API, not its outgoing credentials.

Ready for a timed run? Take the free 15-question KO mini exam: https://devopscodelab.com/app/exams/kubernetes-operations/mini/

DevOpsCode Lab is not affiliated with CNCF. KO and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
