PodDisruptionBudgets: Keeping Apps Available During Node Maintenance
How PodDisruptionBudgets protect availability during voluntary disruptions like node drains and upgrades, minAvailable vs maxUnavailable, and pitfalls.
Published December 2, 2026
Clusters are constantly maintained: nodes are upgraded, drained, replaced by autoscalers or rotated for security patches. Without guardrails, a drain can evict all replicas of a service at once. A PodDisruptionBudget (PDB) tells Kubernetes how many pods of an application must stay up during these voluntary disruptions.
The concept
Kubernetes distinguishes voluntary disruptions (kubectl drain, cluster upgrades, autoscaler scale-down, evictions via the API) from involuntary ones (hardware failure, kernel panic, node out of resources). PDBs only govern voluntary disruptions that go through the Eviction API; they cannot prevent a node from crashing.
A PDB selects pods by label and specifies either minAvailable (pods that must remain) or maxUnavailable (pods that may be down). When a drain tries to evict a pod and doing so would violate the budget, the eviction is refused and the drain waits and retries until enough replacement pods are ready elsewhere.
How a PDB guards a drain
Choosing a budget
| Setting | Meaning | Good for |
|---|---|---|
| minAvailable: 2 | At least 2 pods must stay ready | Fixed-size services |
| minAvailable: 50% | At least half stay ready | Autoscaled services |
| maxUnavailable: 1 | At most 1 pod down at a time | Most stateless apps |
| maxUnavailable: 0 | No voluntary evictions | Blocks drains; avoid |
Guidelines
- Run at least 2 replicas (a PDB cannot protect a single pod without blocking drains)
- Spread replicas across nodes and zones
- Prefer maxUnavailable: 1 for stateless apps
- Check PDB status before cluster upgrades
Practical examples
A simple PDB
Allow one pod to be evicted at a time.
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata: { name: api-pdb }
spec:
maxUnavailable: 1
selector: { matchLabels: { app: api } }Check allowed disruptions
ALLOWED DISRUPTIONS 0 means drains will block.
kubectl get pdb -A
# NAMESPACE NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS
# shop api-pdb N/A 1 1Drain a node respecting PDBs
Evictions honour budgets; delete-emptydir-data is required for pods using emptyDir.
kubectl drain node-1 --ignore-daemonsets --delete-emptydir-data --timeout=10m
kubectl uncordon node-1Common mistakes
- PDBs on single-replica deployments with minAvailable: 1, blocking drains forever.
- maxUnavailable: 0 that prevents any maintenance.
- Selectors that match no pods or pods of several apps.
- Assuming PDBs protect against node crashes.
Key takeaways
- PDBs limit voluntary disruptions like drains and upgrades.
- Use minAvailable or maxUnavailable, not both.
- Combine with multiple replicas and topology spread.
- Check ALLOWED DISRUPTIONS before maintenance.
FAQ
Do PDBs affect rolling updates?
No. Deployment rollouts are governed by maxSurge/maxUnavailable, not PDBs.
What happens if a drain cannot proceed?
kubectl drain keeps retrying evictions until the timeout; managed upgrades may wait or eventually force depending on provider settings.
Should every workload have a PDB?
Every multi-replica production service should; batch jobs and single-replica dev workloads usually do not.