Files
kubernetes/pkg/scheduler/framework/plugins/noderesources
Haosdent Huang f63702de0f scheduler: return UnschedulableAndUnresolvable when node capacity is insufficient
Currently, the NodeResourcesFit plugin always returns Unschedulable when a pod's
resource requests exceed a node's available resources. However, when a pod's
requests exceed the node's total allocatable, preemption cannot help since even
an empty node would not have enough resources.

This change modifies the NodeResourcesFit plugin to return UnschedulableAndUnresolvable
when a pod's resource requests exceed the node's total allocatable. This helps
optimize the scheduling process in large clusters by:
1. Reducing the number of candidate nodes that need to be considered for preemption
2. Providing clearer feedback about unresolvable resource constraints
3. Improving scheduling performance by avoiding unnecessary preemption calculations

The change is particularly beneficial in heterogeneous clusters where node sizes
vary significantly, as it helps quickly identify nodes that are fundamentally
too small for certain pods.

Fixes https://github.com/kubernetes/kubernetes/issues/131310

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
2025-04-22 14:54:40 +08:00
..