Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsMedium

A cluster operator is observing that newly created Pods are consistently stuck in the 'Pending' state. They suspect an issue with resource availability on the worker nodes. Which Kubernetes control plane component is primarily responsible for assigning Pods to nodes?

  1. Akube-controller-manager
  2. Bkube-scheduler
  3. Cetcd
  4. Dkube-apiserver
Show answer & explanation

Correct answer: B. kube-scheduler

The kube-scheduler is the control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on. If Pods are stuck in 'Pending', it often indicates a scheduling issue, such as insufficient resources.

Why the other options are wrong

  • A. The kube-controller-manager runs various controllers that regulate the cluster's state, but scheduling is a separate concern.
  • C. etcd is the distributed key-value store that stores the cluster's configuration data, not a scheduler.
  • D. The kube-apiserver exposes the Kubernetes API, but does not directly schedule Pods.

kube-scheduler

A Kubernetes control plane component responsible for watching for newly created Pods and assigning them to suitable nodes.

  • Considers resource requirements, affinity/anti-affinity, taints/tolerations.
  • Ensures Pods are placed on healthy nodes with available resources.
  • Crucial for Pod lifecycle management.

Memory trick: The scheduler is like the 'travel agent' for Pods, finding them a node home.

More Kubernetes Fundamentals questions