Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsMedium

A cluster operator is investigating why a newly created Pod remains in the 'Pending' state indefinitely. They have verified that the Pod's YAML is correct and there are available resources on worker nodes. Which control plane component is most likely failing or misconfigured, preventing the Pod from being assigned to a node?

  1. Akube-apiserver
  2. Bkubelet
  3. Cetcd
  4. Dkube-scheduler
Show answer & explanation

Correct answer: D. kube-scheduler

The `kube-scheduler` is responsible for watching for new Pods with no assigned node and selecting a node for them to run on. If Pods are stuck in 'Pending' despite available resources, the scheduler is likely the issue.

Why the other options are wrong

  • A. The `kube-apiserver` handles API requests, but its failure would likely prevent Pod creation altogether, not just scheduling.
  • B. The `kubelet` runs on worker nodes and manages Pods on that node, but it doesn't decide which node a Pod is initially assigned to.
  • C. `etcd` stores cluster state; if it fails, the entire cluster would be severely impacted, not just Pod scheduling.

kube-scheduler

The `kube-scheduler` is a control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on.

  • Decides where Pods run.
  • Considers resource requirements, policies, node affinity/anti-affinity.
  • If it fails, new Pods will remain in 'Pending' state.
  • Part of the Kubernetes control plane.

Memory trick: Scheduler's job is to place the Pods on the right nodes.

More Kubernetes Fundamentals questions