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

kubectl drain node-1Eviction APIPDB (minAvailable 2)Deploymentevict api-acheck: 3 ready → 2 OKevictedreplacement api-d startingevict api-brefused (only 2 ready) → retryretry after api-d ready → OK
Drains proceed only as fast as the budget allows.

Choosing a budget

SettingMeaningGood for
minAvailable: 2At least 2 pods must stay readyFixed-size services
minAvailable: 50%At least half stay readyAutoscaled services
maxUnavailable: 1At most 1 pod down at a timeMost stateless apps
maxUnavailable: 0No voluntary evictionsBlocks drains; avoid

Guidelines

  1. Run at least 2 replicas (a PDB cannot protect a single pod without blocking drains)
  2. Spread replicas across nodes and zones
  3. Prefer maxUnavailable: 1 for stateless apps
  4. Check PDB status before cluster upgrades
PDB best practices.

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                1

Drain 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-1

Common 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.

More DevOps articles