A Deployment's pods request cpu: 2 with no CPU limit. Every node reports allocatable.cpu: 1900m. The pods have been Pending for ten minutes. Walk me through why.
- The kubelet rejected the pod because it would exceed the node's CPU quota. The kubelet admits pods only after the scheduler binds them; a Pending pod has not reached any kubelet.
- The pod needs a PriorityClass to be scheduled when resources are tight. PriorityClasses affect preemption order; a pod with no PriorityClass schedules normally when resources fit.
- The scheduler compares the pod's CPU limit to node capacity; with no limit set it cannot schedule. Limits are enforced by the kubelet/cgroups at runtime; scheduling only looks at requests.
- The scheduler filters nodes by the pod's CPU request against node allocatable, and no node has 2 allocatable. Filtering uses requests against allocatable capacity (capacity minus system reservations), not limits and not raw capacity.
The scheduler places a pod by its CPU request against the node's allocatable CPU, not by its limit.
The scheduler's filtering phase removes every node whose allocatable resources cannot satisfy the pod's requests. Allocatable is capacity minus kube- and system-reserved amounts, so a "4-core" node may only offer 3800m. Limits play no part in placement; they are enforced later by the kubelet via cgroups. The FailedScheduling event on the pod lists how many nodes failed each filter ("0/3 nodes are available: 3 Insufficient cpu").
Saying the pod has no CPU limit, so it cannot be placed. Limits play no part in placement at all.