Define a PodDisruptionBudget using policy/v1 API (available since Kubernetes 1.21): set spec.selector.matchLabels to match your StatefulSet pods and choose either minAvailable or maxUnavailable — not both
For a 3-replica StatefulSet requiring quorum, use minAvailable: 2 so at most one pod can be voluntarily disrupted at a time
Apply with kubectl apply -f pdb.yaml and verify with kubectl get pdb -n <namespace> — the ALLOWED DISRUPTIONS column should reflect available disruption budget
Test by running kubectl drain <node> --ignore-daemonsets --delete-emptydir-data and confirming drain respects the PDB rather than evicting all pods on the node immediately
For StatefulSets with persistent storage, combine PDB with podManagementPolicy: OrderedReady and set maxUnavailable: 1 on the StatefulSet itself so rolling updates also respect ordering
Known gotchas
A PDB with minAvailable equal to the total replica count blocks all voluntary disruptions including kubectl drain; ensure minAvailable is strictly less than the replica count or use maxUnavailable: 1
PDBs only govern voluntary disruptions (drains, evictions). Node failures cause involuntary disruptions that bypass PDB constraints
If a deployment's selector does not match the PDB selector exactly, the PDB silently provides no protection — verify the CURRENT count in kubectl get pdb is non-zero when pods are running
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp