The kube-scheduler is doing its job (evaluating nodes), but it's not actually placing (binding) Pods onto those nodes. This means it's finding nodes, but something is preventing it from completing the placement.
nodeSelector and affinity: These are rules you define in your Pod's specification to tell Kubernetes where you want your Pod to run.
> nodeSelector: A simple key-value pair that must match a node's labels.
> affinity: More complex rules, including "required" and "preferred" terms, allowing for more nuanced placement.
If your nodeSelector or affinity rules are incorrect, the scheduler might find nodes that seem suitable but then fail the final check because the labels don't exactly match or the affinity rules are not met.
For example, if the pod needs a node with label "gpu: nvidia-tesla-v100", but all the available gpu nodes are labeled "gpu: nvidia-tesla-a100", then the scheduler will fail to bind the pod.
The scheduler works hard, but the Pods remain in a Pending
state because they can't find a truly matching node. Once it finds a suitable node, it sends a "bind" request to the kube-apiserver, assigning the Pod to that node.
SIDE NOTE:
Preemption is when the scheduler evicts lower-priority Pods to make room for higher-priority ones.