Pod Disruption Budget Generator
Generate a PodDisruptionBudget from replica count and availability requirements, and avoid the two configurations that deadlock a cluster node drain permanently.
Last reviewed by the Radiatus Cloud team
Want this automated for your stack?
We build CI/CD, Kubernetes & IaC pipelines that scale.
What a PDB actually protects against
A PodDisruptionBudget constrains voluntary disruptions: node drains, cluster autoscaler scale downs, and node pool upgrades. It does not protect against a node failing, a kernel panic, an out of memory kill or anything else involuntary, because there is nothing to negotiate with in those cases. This distinction matters because a PDB gives a false sense of availability if you believe it guarantees a minimum number of running pods under all circumstances. It guarantees only that the eviction API will refuse to take you below the threshold.
Two configurations deadlock a drain
Setting minAvailable equal to the replica count means no pod may ever be evicted voluntarily, so a node drain blocks forever and a cluster upgrade never completes. Setting maxUnavailable to zero does the same thing. Both look like the safest possible configuration and both turn routine maintenance into a manual intervention, usually discovered at three in the morning during an urgent security patch. A single replica deployment with any PDB at all has the same problem, because evicting the only pod always violates the budget.
Percentages round in the safe direction
minAvailable as a percentage rounds up and maxUnavailable rounds down, both in favour of availability. With ten replicas, minAvailable of 50% requires five available, and maxUnavailable of 50% permits five to go. With three replicas, minAvailable of 50% rounds up to two, leaving only one evictable at a time. Percentages are usually preferable to absolute numbers because they stay correct when the deployment is scaled, which absolute numbers do not.
Related tools
- CI/CD Security Gap Analyzer — Checklist based analyzer for CI/CD pipeline security gaps.
- Docker Security Scanner — A new tool extracted from the codebase.
- Terraform Scanner — A new tool extracted from the codebase.
- SQL Formatter — Format and indent SQL queries for readability. Handles joins, subqueries and CTEs, supports common dialects, and runs entirely in your browser.
Frequently Asked Questions
What is the difference between minAvailable and maxUnavailable?
minAvailable states how many pods must remain running; maxUnavailable states how many may be taken down. They are two ways of expressing the same constraint and you may set only one. maxUnavailable scales more naturally with replica count changes.
Does a PDB protect against node failure?
No. It only governs voluntary disruptions through the eviction API: drains, autoscaler scale downs and upgrades. A node that fails, panics or runs out of memory takes its pods with it regardless of any budget.
Why is my node drain hanging?
Almost always a PDB that permits zero disruptions, from minAvailable equal to the replica count or maxUnavailable of zero, or a single replica deployment with any PDB. The eviction API correctly refuses every request and the drain waits indefinitely.
Should I use a percentage or a number?
A percentage, generally, because it stays correct when the deployment is scaled. minAvailable percentages round up and maxUnavailable percentages round down, both in favour of availability, so the arithmetic is worth checking at small replica counts.
Do I need a PDB for a single replica?
Any PDB on a single replica deployment blocks drains entirely, since evicting the only pod always violates it. If the workload genuinely cannot tolerate momentary unavailability, it needs more than one replica; a PDB cannot create availability that the replica count does not provide.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Enter replicas and the minimum you need available to generate a correct PDB.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.