concept
Capacity and advanced scheduling
A scheduler needs a node that can satisfy a Pod request, not simply a cluster with unused CPU in aggregate. Start with Node Allocatable, which reflects configured system reservations; subtract existing scheduled requests, including DaemonSet requests that consume allocatable resources. Do not subtract system reservations twice. For an ordinary Pod with no restartable init sidecars or Pod-level resources, use the larger of the sum of app container requests and the largest init request for each resource, then add Pod overhead when configured. Real accounting has additional rules for native sidecars and newer Pod-level resource features.
Formal Syntax & Structure
kubernetes syntaxkubernetes
Node allocatable: 4000m CPU, 8192 MiBExisting requests: 2300m, 4096 MiBRemaining: 1700m, 4096 MiBNew Pod: 1500m + 100m overhead, 3072 MiBFits the two-resource gate; 100m CPU remains.Working Example
Example Snippetkubernetes
A fails memory; B fails CPU; C passes both.Scoring cannot rescue a node that failed filtering.