Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsMedium
A cluster operator is observing that a newly created Pod remains in the 'Pending' state indefinitely. Which of the following components is primarily responsible for assigning Pods to Nodes, and its malfunction could cause this issue?
- Akube-apiserver
- Betcd
- Ckube-controller-manager
- Dkube-scheduler
Show answer & explanationAnswer & explanation
Correct answer: D. kube-scheduler
The kube-scheduler watches for newly created Pods that have no assigned node and selects a node for them to run on. If it's not functioning correctly, Pods will remain in a 'Pending' state.
Why the other options are wrong
- A. The kube-apiserver exposes the Kubernetes API but doesn't schedule Pods.
- B. etcd is the distributed key-value store for cluster state, not directly involved in scheduling.
- C. The kube-controller-manager runs various controllers, but not the scheduler.
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.
- Assigns Pods to nodes.
- Considers resource requirements, policies, affinity/anti-affinity.
- Crucial for Pod lifecycle management.
Memory trick: The Scheduler is the brain that figures out where to 'Settle' Pods.