KCNA ยท Cluster administration and scheduling
How the scheduler places Pods
Filtering and scoring, binding, unschedulable Pods, role of kubelet after binding.
Key points
- kube-scheduler watches for Pods without a node.
- It filters out nodes that cannot satisfy the Pod (for example not enough free CPU for its requests), then scores the feasible ones and picks the best; ties are broken randomly.
- It then binds the Pod by telling the API server the chosen node.
- The kubelet on that node starts the containers.
- If no node passes filtering, the Pod stays Pending.
Source: https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/
Practice questions
What are the two main phases the scheduler runs for each unscheduled Pod?
- Pulling and running
- Filtering and scoring
- Cordoning and draining
- Scaling and tainting
Show answer
Answer: B. Filtering and scoring
Filtering removes infeasible nodes and scoring ranks the rest. Pulling and running are not scheduler phases.
Which tasks belong to kube-scheduler?
- Filtering out nodes that cannot run the Pod
- Scoring the feasible nodes
- Pulling the container image on the node
- Telling the API server which node was chosen
- Starting the container processes
Show answer
Answer: A. Filtering out nodes that cannot run the Pod, B. Scoring the feasible nodes, D. Telling the API server which node was chosen
The scheduler filters nodes, scores feasible ones and reports its choice to the API server. Pulling images and starting containers are done by the kubelet and container runtime.
After choosing a node, kube-scheduler itself starts the containers on that node.
Show answer
Answer: False
False. The scheduler only records the decision (binding). The kubelet on the chosen node starts the containers.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
