PDB Allowed Disruptions Zero: Debugging
Debug PodDisruptionBudgets stuck at zero allowed disruptions. Understand minAvailable vs maxUnavailable, fix eviction failures, and plan for maintenance.
π‘ Quick Answer:
ALLOWED DISRUPTIONS: 0means no pods can be evicted without violating the PDB. Checkoc get pdb -Aβ ifminAvailableequals the current replica count, thereβs zero headroom. Fix: increase replicas, lowerminAvailable, or switch tomaxUnavailable: 1.
The Problem
Youβre trying to drain a node, perform cluster maintenance, or run a voluntary disruption, but evictions fail with βCannot evict pod as it would violate the podβs disruption budget.β The PDB shows ALLOWED DISRUPTIONS: 0, blocking all maintenance operations.
The Solution
Step 1: Identify Problem PDBs
# List all PDBs with zero allowed disruptions
oc get pdb -A -o custom-columns=\
'NAMESPACE:.metadata.namespace,NAME:.metadata.name,MIN-AVAIL:.spec.minAvailable,MAX-UNAVAIL:.spec.maxUnavailable,CURRENT:.status.currentHealthy,DESIRED:.status.desiredHealthy,ALLOWED:.status.disruptionsAllowed' | \
grep -E "ALLOWED| 0$"Step 2: Understand Why Itβs Zero
Scenario A: minAvailable == replicas
# PDB says: keep at least 3 running
spec:
minAvailable: 3
# Deployment has exactly 3 replicas
# 3 - 3 = 0 disruptions allowedScenario B: Pods not healthy
# PDB says: keep at least 2 running
spec:
minAvailable: 2
# 3 replicas, but 1 is CrashLooping β only 2 healthy
# 2 - 2 = 0 disruptions allowedScenario C: maxUnavailable = 0
# Explicitly no disruptions (misconfiguration)
spec:
maxUnavailable: 0 # Never do thisStep 3: Fix the PDB
Option A: Increase replicas (preferred)
# If minAvailable: 3, scale to 4 so 1 disruption is allowed
oc scale deploy my-app --replicas=4Option B: Lower minAvailable
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: my-app-pdb
spec:
minAvailable: 2 # Was 3, now allows 1 disruption with 3 replicas
selector:
matchLabels:
app: my-appOption C: Switch to maxUnavailable (recommended)
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: my-app-pdb
spec:
maxUnavailable: 1 # Always allows 1 pod to be disrupted
selector:
matchLabels:
app: my-appminAvailable vs maxUnavailable
| Setting | Replicas=3 | Allowed Disruptions | Drain-Safe? |
|---|---|---|---|
minAvailable: 3 | 3 | 0 | β Blocks drains |
minAvailable: 2 | 3 | 1 | β |
minAvailable: 1 | 3 | 2 | β |
maxUnavailable: 0 | 3 | 0 | β Blocks drains |
maxUnavailable: 1 | 3 | 1 | β |
maxUnavailable: "33%" | 3 | 1 | β |
Common Issues
PDB Matches No Pods
# If selector matches 0 pods, PDB is a no-op (doesn't block anything)
oc get pdb my-pdb -o jsonpath='{.status.currentHealthy}'
# 0 = selector mismatch or no podsPDB with Both minAvailable and maxUnavailable
Not allowed. The API rejects PDBs with both fields set.
Temporary Override During Maintenance
# Delete the PDB, drain, then recreate
oc delete pdb my-app-pdb -n my-namespace
# ... perform maintenance ...
oc apply -f pdb.yamlBest Practices
- Use
maxUnavailable: 1instead ofminAvailableβ it scales with replica count - Always have replicas > minAvailable β leave headroom for disruptions
- Use
maxUnavailable: "25%"for large deployments β percentage-based is more flexible - Never set
maxUnavailable: 0β this blocks all voluntary disruptions including upgrades - Test PDBs before production β
oc get pdbshould showALLOWED DISRUPTIONS: 1+
Key Takeaways
ALLOWED DISRUPTIONS: 0blocks all evictions (drain, scale-down, upgrades)- Root cause is usually
minAvailableequal to current healthy count maxUnavailable: 1is the safest pattern β always allows controlled disruption- Unhealthy pods reduce the disruption budget β fix CrashLooping pods first
- PDBs only affect voluntary disruptions β involuntary evictions (OOM, preemption) bypass them

Recommended
Kubernetes Recipes β The Complete Book100+ production-ready patterns with detailed explanations, best practices, and copy-paste YAML. Everything in one place.
Get the Book βLearn by Doing
CopyPasteLearn β Hands-on Cloud & DevOps CoursesMaster Kubernetes, Ansible, Terraform, and MLOps with interactive, copy-paste-run lessons. Start free.
Browse Courses β