πŸ“šBook Signing at KubeCon EU 2026Meet us at Booking.com HQ (Mon 18:30-21:00) & vCluster booth #521 (Tue 24 Mar, 12:30-1:30pm) β€” free book giveaway!RSVP Booking.com Event
Deployments intermediate ⏱ 10 minutes K8s 1.28+

Kubernetes PodDisruptionBudget (PDB) Guide

Configure PodDisruptionBudgets to protect workloads during node drains, upgrades, and maintenance. minAvailable, maxUnavailable, and eviction policies.

By Luca Berton β€’ β€’ πŸ“– 5 min read

πŸ’‘ Quick Answer: A PodDisruptionBudget (PDB) limits how many pods of a workload can be voluntarily disrupted at once during node drains, upgrades, or cluster autoscaler scale-downs. Set `minAvailable` (minimum pods that must stay running) or `maxUnavailable` (maximum pods that can be down simultaneously).

The Problem

During node maintenance, upgrades, or autoscaler operations, Kubernetes evicts pods. Without a PDB, all pods of a deployment could be evicted simultaneously, causing downtime. PDBs tell the eviction API β€œyou can take down at most N pods at a time.”

flowchart TB
    subgraph WITHOUT["Without PDB"]
        D1["Drain node-01"] --> E1["Evict pod-1 βœ…"]
        D1 --> E2["Evict pod-2 βœ…"]
        D1 --> E3["Evict pod-3 βœ…"]
        E1 & E2 & E3 --> DOWN["πŸ’₯ 0/3 pods running<br/>DOWNTIME"]
    end
    subgraph WITH["With PDB (minAvailable: 2)"]
        D2["Drain node-01"] --> F1["Evict pod-1 βœ…"]
        D2 --> F2["Evict pod-2 ❌ blocked"]
        D2 --> F3["Evict pod-3 ❌ blocked"]
        F1 --> RESCHEDULE["pod-1 rescheduled"]
        RESCHEDULE --> F4["Now evict pod-2 βœ…"]
    end

The Solution

Using minAvailable

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: web-app-pdb
spec:
  minAvailable: 2                # At least 2 pods must always be running
  selector:
    matchLabels:
      app: web-app               # Must match deployment labels

Using maxUnavailable

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: web-app-pdb
spec:
  maxUnavailable: 1              # At most 1 pod can be down at a time
  selector:
    matchLabels:
      app: web-app

Percentage Values

# At least 80% of pods must remain available
spec:
  minAvailable: "80%"
  selector:
    matchLabels:
      app: web-app

# At most 25% of pods can be unavailable
spec:
  maxUnavailable: "25%"
  selector:
    matchLabels:
      app: web-app

Which to Use?

SettingBest ForExample
`minAvailable: N`Fixed minimum capacityDatabase: always need 2 replicas
`maxUnavailable: 1`Rolling evictionWeb apps: evict one at a time
`minAvailable: β€œ80%β€œ`Scaling workloadsPercentage scales with replica count
`maxUnavailable: β€œ25%β€œ`Large deploymentsAllow quarter of fleet down

Verify PDB Status

kubectl get pdb
# NAME          MIN AVAILABLE   MAX UNAVAILABLE   ALLOWED DISRUPTIONS   AGE
# web-app-pdb   2               N/A               1                     5m

kubectl describe pdb web-app-pdb
# Status:
#   Current Healthy:   3
#   Desired Healthy:   2
#   Disruptions Allowed: 1
#   Expected Pods:     3

Common Issues

IssueCauseFix
Node drain stuckPDB blocks all evictionsReduce `minAvailable` or add replicas
PDB allows 0 disruptionsNot enough healthy podsScale up deployment first
Cluster autoscaler can’t scale downPDB prevents evictionUse `maxUnavailable: 1` instead of `minAvailable: N` where N = replicas
PDB doesn’t protect against crashesPDB only covers voluntary disruptionsUse health probes + restart policies
Selector doesn’t matchLabels mismatchVerify `kubectl get pods -l app=web-app`

Best Practices

  • Every production deployment should have a PDB β€” it’s free availability protection
  • Use `maxUnavailable: 1` as default β€” works for most workloads
  • Don’t set `minAvailable` equal to replicas β€” blocks all evictions including upgrades
  • Use percentages for auto-scaling workloads β€” adapts to replica count
  • Combine with pod anti-affinity β€” spread pods across nodes for true HA
  • Test with `kubectl drain β€”dry-run` β€” verify PDB behavior before maintenance

Key Takeaways

  • PDB limits voluntary pod disruptions (drains, upgrades, autoscaler) β€” not crashes
  • `minAvailable`: minimum pods that must stay running
  • `maxUnavailable`: maximum pods that can be down simultaneously
  • Supports absolute numbers or percentages
  • `ALLOWED DISRUPTIONS: 0` means no pods can be evicted β€” will block node drains
  • Essential for zero-downtime maintenance and cluster upgrades
#poddisruptionbudget #pdb #availability #maintenance #eviction
Luca Berton
Written by Luca Berton

Principal Solutions Architect specializing in Kubernetes, AI/GPU infrastructure, and cloud-native platforms. Author of Kubernetes Recipes and creator of CopyPasteLearn courses.

Kubernetes Recipes book cover

Want More Kubernetes Recipes?

This recipe is from Kubernetes Recipes, our 750-page practical guide with hundreds of production-ready patterns.

Luca Berton Ansible Pilot Ansible by Example Open Empower K8s Recipes Terraform Pilot CopyPasteLearn ProteinLens