Interactive animated diagrams to understand Kubernetes node autoscaling
Karpenter observes unschedulable pods and provisions exactly the right node in under a minute. No pre-defined node groups needed.
Consolidates workloads onto fewer nodes, replaces drifted nodes, and expires old nodes — automatically.
Controls how fast Karpenter replaces nodes. Separate from Pod Disruption Budgets (PDBs) which protect pod availability.
Define NodePools and NodeClasses as Kubernetes CRDs. No Auto Scaling Groups — Karpenter talks directly to your cloud provider.
Karpenter watches for unschedulable pods, matches NodePools, and provisions nodes using NodeClass templates.
Defines constraints for which nodes Karpenter can create:
apiVersion: karpenter.sh/v1beta1
kind: NodePool
spec:
disruption:
budgets:
- nodes: "20%"
Defines how to provision the cloud instance:
apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
spec:
amiFamily: AL2
subnetSelectorTerms:
- tags:
karpenter.sh/discovery: cluster
Limits that control how many nodes Karpenter can disrupt at once for consolidation, drift correction, or expiration.
Think of them as a "rate limiter for node churn" — protecting cluster stability from cascading replacements.
Nodes Budget: A count or percentage of nodes allowed to disrupt simultaneously.
Schedule Budget: A time window with its own disruption limit (e.g., allow more during off-hours).
Try it: Adjust the budget slider, then click Start Demo. Karpenter flags nodes that need replacement (drift/consolidation/expiry), but only replaces up to the budget limit at a time. Excess nodes wait in a queue.
spec:
disruption:
budgets:
- nodes: "20%"
reasons:
- Drifted
- UnderUtilized
- Empty
spec:
disruption:
budgets:
- nodes: "1"
- schedule: "0 2 * * *"
duration: "6h"
nodes: "5"
reason: Drifted
spec:
disruption:
budgets:
- nodes: "2" # base
- nodes: "10" # override
reasons:
- Empty
- schedule: "0 22 * * *"
duration: "8h"
nodes: "0" # block
| Aspect | 🎯 Pod Disruption Budget (PDB) | 🚀 Karpenter Disruption Budget |
|---|---|---|
| Scope | Protects individual pods | Controls node removal |
| Unit | minAvailable or maxUnavailable (pods) |
nodes (count or %) |
| Enforced by | Kubernetes Eviction API | Karpenter's disruption controller |
| Location | Per workload (namespace + label selector) | Per NodePool |
| Decision | "Can I evict this pod?" | "Can I terminate this node?" |
| Time windows | ❌ Not supported | ✅ schedule + duration |
| Relationship | Karpenter respects PDBs when evicting pods | PDBs do not control node disruption rate |
Karpenter checks: "Am I disrupting too many nodes?"
Cordon node → begin pod eviction
Eviction API checks: "Will PDB be violated?"
✅ Allowed → delete pod
❌ Denied → 429, Karpenter retries
Key insight: You need both. PDBs protect your application's pod availability. Karpenter budgets protect cluster stability from too many simultaneous node replacements.
Set minAvailable: 1 or higher for every critical deployment. Karpenter will never violate your PDB.
Begin with nodes: 1 or nodes: "10%". Gradually increase as you gain confidence.
Allow aggressive consolidation (nodes: "50%") during off-peak hours with schedule budgets.
Set nodes: "0" during business hours for Drifted/UnderUtilized reasons if needed.