Capacity and scale trade-offs
Plan enough eligible capacity for normal load, rollouts, and a node failure.
What you will understand
- Calculate remaining room using node allocatable resources and existing requests.
- Account for Pod placement constraints, overhead, and namespace quotas.
- Estimate extra capacity needed when a rollout and node failure overlap.
Builds on: Scheduler internals, Autoscaling mechanics and feedback
Find room for each Pod on an eligible node
Six API replicas each request half a CPU and 512 MiB of memory. They need at least three allocatable CPUs and 3 GiB of memory in total. Kubernetes schedules one Pod at a time on one viable node, though. Half a CPU spare across the cluster might be split into small amounts no single new Pod can use. If the workload also needs a particular zone or storage topology, only nodes in suitable locations count.
Allocatable capacity is what a node reports as available for Pods after applicable reservations. Subtract requests already assigned, including node agents, and consider Pod overhead where a RuntimeClass specifies it. Check both CPU and memory alongside other constraints such as Pod count, taints, and device availability. Use the budget scene to see why a single total can hide a placement failure.
Where can the next Pod actually fit?
Start from node allocatable capacity, subtract existing requests, then check placement constraints and quotas for the incoming Pod.
Read allocatable resources
- Node allocatableSchedulerremaining budget
Node reservations reduce physical capacity to the budget available for Pods.
Account for existing requests
- Required DaemonSetsNode allocatableconsume capacity
- Node allocatableSchedulerremaining budget
DaemonSets and existing Pod requests consume that budget before new replicas can fit.
Test the remaining eligible nodes
- Application requestsSchedulerrequired resources
- Node allocatableSchedulerremaining budget
The scheduler also checks topology, volumes and other hard constraints; aggregate free CPU is insufficient evidence.
CPU and memory are highlighted; actual capacity also depends on Pod counts, devices, storage and network limits.
Explore another case
Plan for a failure during a rollout
Headroom means capacity left for events you expect, such as a rollout, drain, or sudden increase in demand. Imagine three eligible nodes each carrying two replicas at half a CPU apiece. Lose one node and the remaining nodes need room for two replacement Pods. If a rolling update also permits one surge replica, you need space for three additional placements on those remaining nodes to handle that overlap. Observe how the answer changes if the replacements need to spread across failure domains.
What must remain free during a rollout or node loss?
Reserve enough room on eligible nodes for both the extra rollout copy and any replacement Pods you plan to recover.
Budget normal replicas
- Steady replicasRemaining node poolbaseline requests
Requests fit during ordinary operation, leaving explicitly planned spare capacity.
Allocate spare space to the disruption
- Rollout surgeRemaining node poolsurge requests
- Node unavailableRemaining node poolreplacement demand
A rollout or unavailable node creates temporary placement demand beyond the ordinary count.
Verify that replacements become ready
- Remaining node poolReady capacitystartup + readiness
New Pods supply useful capacity only after startup, readiness and endpoint propagation.
This is a planning model, not a measured guarantee; provider provisioning and application startup must be validated separately.
Explore another case
Compare the namespace and node budgets
Read both physical and namespace budgets. The illustrative quota allows two CPUs in requests. In the six-replica example, the quota would reject some Pods even if every node had spare CPU. Five 400m replicas also use the full two-CPU budget and leave nothing for a rollout surge. Review quota usage, then inspect node allocatable and assigned requests. The example quota is optional in the disposable lab and the cleanup removes only that quota.
apiVersion: v1
kind: ResourceQuota
metadata:
name: m17-budget
namespace: kv-lab
labels:
lab: m17
spec:
hard:
requests.cpu: "2"
requests.memory: 2Gi
limits.memory: 4Gi
pods: "20"kubectl --context kind-kv-lab get nodes -o custom-columns=NAME:.metadata.name,CPU:.status.allocatable.cpu,MEMORY:.status.allocatable.memory
kubectl --context kind-kv-lab describe node kv-lab-control-plane
kubectl --context kind-kv-lab -n kv-lab get pods -o wide
kubectl --context kind-kv-lab -n kv-lab get resourcequota
# If the optional example was applied, remove just that budget afterward.
kubectl --context kind-kv-lab -n kv-lab delete resourcequota m17-budget --ignore-not-foundUse the capacity lab to calculate which placement or admission requirement is limiting you. Name the event you want to tolerate and verify that spare capacity remains on eligible nodes after that event.
Check control-plane load as the cluster grows
Cluster growth affects the control plane too. More Pods generate more API objects, watch events, leases, and status changes. When expanding a cluster, observe scheduling latency and API server and etcd performance alongside node utilization. Resource availability for workload Pods and capacity to coordinate them can become separate bottlenecks.
Check your understanding
The cluster reports 2 CPUs spare. A Pod requesting half a CPU remains Pending. What can explain that?
No single eligible node may have half a CPU available, or another required resource or placement rule may fail. Inspect the scheduling event and compare each candidate’s available requests and labels.
Go to the source
Reviewed 2026-10-27 · Kubernetes 1.37 · Related local exercise