KO

Free KO practice questions

10 questions from our KO practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the KO practice exams

Question 1 of 10, Cluster Lifecycle and Upgrades

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?

  1. ABuild 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.
  2. BRun 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.
  3. CUpgrade 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.
  4. DUpgrade 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. Correct answer

Answer and 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, Cluster Lifecycle and Upgrades

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?

  1. ARun the webhook as a static pod on every control-plane node, so it is never drained and is always available to the API server.
  2. BExclude kube-system and the webhook's own namespace via a namespaceSelector, and run several webhook replicas under a PDB. Correct answer
  3. CSwitch to failurePolicy: Ignore permanently so pod creation always succeeds whenever the webhook is unreachable during any type of maintenance.
  4. DRaise the webhook timeoutSeconds to 30 so the API server waits longer for the replacement webhook replicas to become ready again.

Answer and 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, Scheduling, Autoscaling and Capacity

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?

  1. ALower --scale-down-utilization-threshold to 0.1, so that nodes with very little requested capacity become candidates for removal sooner.
  2. BAssign the Deployment a low-value PriorityClass so the autoscaler treats its pods as preemptible and ignores them when evaluating scale-down.
  3. CCreate a PodDisruptionBudget with maxUnavailable: 1 for the Deployment so the autoscaler knows that evicting one pod is permitted.
  4. DAnnotate the pod template with cluster-autoscaler.kubernetes.io/safe-to-evict: "true" so the autoscaler may evict pods with local storage. Correct answer

Answer and 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, Scheduling, Autoscaling and Capacity. 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.)

  1. AGive the payment pods a PriorityClass with a higher value than the batch workloads so they schedule first and can preempt them. Correct answer
  2. BUse a nodeSelector that places payment pods on control-plane nodes, which are excluded from kubelet node-pressure eviction.
  3. CSet memory and CPU requests equal to limits on every payment container so the pods run in the Guaranteed QoS class. Correct answer
  4. DAdd a PodDisruptionBudget with minAvailable: 80% so the kubelet must respect it before evicting payment pods for memory pressure.
  5. ERaise terminationGracePeriodSeconds on payment pods to 300 so the kubelet gives them more time before a node-pressure eviction completes.

Answer and 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, Cluster Networking, CNI and DNS

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?

  1. ARun CoreDNS with hostNetwork: true on every node so DNS answers no longer cross the overlay network and avoid encapsulation.
  2. BSet dnsPolicy: ClusterFirstWithHostNet on all application pods so their DNS queries bypass kube-proxy and go to CoreDNS directly.
  3. CRaise the CoreDNS cache TTL to 3600 seconds so that records stay cached for an hour and far fewer queries reach the upstream.
  4. DDeploy NodeLocal DNSCache so pods query a caching agent on their own node, cutting cross-node UDP traffic and conntrack entries. Correct answer

Answer and 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, Cluster Networking, CNI and DNS

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?

  1. AThe cloud controller manager lost track of the node list during the update, and it will resync the target group after the default sync period.
  2. BThis 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. Correct answer
  3. CKube-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.
  4. DThe Service's healthCheckNodePort collided with another NodePort Service, and only three nodes kept the original port allocation after the change.

Answer and 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, Storage, Backup and Disaster Recovery

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?

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

Answer and 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, Observability and Incident Troubleshooting

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?

  1. AThree nodes are cordoned for maintenance, and five nodes are running at their memory limits as reported by metrics-server.
  2. BThree nodes are reserved for system workloads, and five nodes are experiencing kernel memory pressure and refusing pods.
  3. CThree nodes carry a custom taint added by an operator, and five nodes have a memory ResourceQuota that the pod exceeds.
  4. DThree nodes lost contact with the control plane and are tainted, and the five healthy nodes lack enough free requested memory. Correct answer

Answer and 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, Observability and Incident Troubleshooting

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?

  1. AThe node is overcommitted on memory and swaps under load, so the team should add memory requests to every pod scheduled on that node.
  2. BThe 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.
  3. CThe HPA is scaling too slowly, so each pod runs hot; lower the HPA target utilisation so new replicas start earlier during spikes.
  4. DBursts hit the CFS quota within individual 100 ms periods even though the average is low; raise or remove the CPU limit for this service. Correct answer

Answer and 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, Security Operations

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?

  1. AThe Node authorizer combined with the NodeRestriction admission plugin, which scope kubelets to their own node and its pods. Correct answer
  2. BA NetworkPolicy that blocks traffic from the node to the API server, so the stolen credentials cannot be used from that node.
  3. CThe --anonymous-auth=false kubelet flag, which prevents anyone from using the kubelet's credentials without a password.
  4. DThe PodSecurity admission controller set to restricted, which blocks kubelets from reading any Secrets in the cluster.

Answer and 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.