Scheduler filtering and scoring phases
how Pods get placed on Nodes.
filtering eliminates infeasible Nodes via resources, taints, and affinity, then scoring ranks the survivors to pick the best, after which the Pod is bound.
What's really being asked
This checks whether you understand scheduling as a two-stage pipeline and the difference between hard constraints and soft preferences.
The full answer
The scheduler first filters: it evaluates every Node and discards those that cannot feasibly run the Pod. Filtering considers whether the Node has enough allocatable CPU and memory, whether it satisfies a required nodeSelector or requiredDuringScheduling node affinity, whether the Pod tolerates the Node's taints, and whether required volumes can be attached. This yields a set of feasible Nodes. Then it scores: each feasible Node is ranked by weighted priority functions, such as balancing resource utilization, honoring preferred node or pod affinity and anti-affinity, and spreading replicas across zones or nodes. The scheduler picks the highest-scoring Node and binds the Pod to it via the apiserver. Taints and tolerations and required affinity are hard filters that exclude Nodes, while preferred affinity and spreading influence scoring rather than exclusion.
The mistakes people make
Conflating filtering and scoring into one step. Thinking taints rank Nodes instead of excluding them. Treating preferred affinity as a hard requirement. Believing the scheduler starts the container itself.
What usually comes next
What is the difference between required and preferred affinity? How do taints and tolerations work? What happens if no Node passes filtering? How does pod anti-affinity spread replicas?
A concrete example
A Pod requests a GPU and tolerates the gpu taint. Filtering eliminates all Nodes without GPUs and any GPU Node whose taint the Pod does not tolerate, leaving three GPU Nodes. Scoring then prefers the Node with the least existing GPU load and one in a zone where no replica yet runs, so the scheduler binds the Pod there. If no Node had passed filtering, the Pod would stay Pending until capacity appears.
Interview question
What is the role of the filtering phase in the Kubernetes scheduler?
- a.It eliminates Nodes that cannot feasibly run the Pod, leaving candidates for scoringCorrect
- b.It starts the container on the chosen Node
- c.It compresses the Pod image before placement
- d.It ranks all Nodes from best to worst
Why? this is the answer
Filtering applies hard constraints (resources, taints, required affinity) to discard infeasible Nodes; scoring then ranks the survivors. Ranking is the scoring phase (D), and the kubelet starts containers (B).
Just read this? Test yourself on what you have been reading.
Read the original → kubernetes.io
- #kubernetes
- #scheduler
- #affinity
- #taints
- #scheduling
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on kubernetes — each one lists the topics its interview covers.
See open roles