Compute
Consolidation and Spot
19 / 69

Karpenter removes empty nodes and replaces underused ones, and drains Spot nodes before AWS reclaims them.

Underused nodesnode Anode Bnode Cone smaller nodeResult: three nodes become one cheaper node; A and C are terminatedPods move gracefully, honouring PodDisruptionBudgetsEmpty nodes are removed after consolidateAfter
ec2 icon

Spot interruption

1
2-min notice
EventBridge to SQS
→
2
Karpenter
starts a replacement
→
3
Drain
Pods get SIGTERM

Pods must cooperate

Handle SIGTERM, set terminationGracePeriodSeconds, keep several replicas and a PDB. A Pod that ignores SIGTERM is cut off whatever the warning.

Disruption budgets

budgets: [{nodes: "10%"}] limits how many nodes Karpenter may disrupt at once, and you can forbid it in business hours.