KubeKanvas Logo
  • Features
  • Pricing
  • Templates
    • How KubeKanvas works
    • Docs
    • Downloads
    • Blog
    • E-Book
    • Tutorials
  • FAQs
  • Contact
  • Features
  • Pricing
  • Templates
    • How KubeKanvas works
    • Docs
    • Downloads
    • Blog
    • E-Book
    • Tutorials
  • FAQs
  • Contact

Pod Disruption Budget in Kubernetes: plan maintenance without dropping availability

A practical guide showing how Pod Disruption Budgets help Kubernetes plan voluntary maintenance without accidentally dropping availability.
Shamaila Mahmood
Shamaila Mahmood
July 9, 2026
Kubernetes
Pod Disruption Budget in Kubernetes: plan maintenance without dropping availability

Related Articles

The Invisible Wall: Why True Kubernetes Project Separation Has Always Been Missing — Until Now
The Invisible Wall: Why True Kubernetes Project Separation Has Always Been Missing — Until Now
Teams spend weeks perfecting clean folder structures and repo boundaries — then deploy to Kubernetes...
Shamaila Mahmood
Shamaila Mahmood
May 29, 2026
Kubernetes
Step by Step guide to migrate ingress to Gateway API
Migrating from Ingress to Gateway API - The Modern Way to Expose Kubernetes Services
Learn how to migrate from Kubernetes Ingress to Gateway API, replacing Ingress-NGINX with a modern, ...
Shamaila Mahmood
Shamaila Mahmood
November 14, 2025
Kubernetes
Top 6 Kubernetes IDEs & Dashboards (2025 Edition): Best Kubernetes Tools for Kubernetes Projects
Top 6 Kubernetes IDEs & Dashboards (2025 Edition): Best Kubernetes Tools for Kubernetes Projects
Discover the best Kubernetes tools of 2025, including top Kubernetes management tools and Kubernetes...
Rafay Siddiquie
November 13, 2025
Kubernetes
Securing Kubernetes Pods: A Complete Guide to Pod-Level Security Configuration
Securing Kubernetes Pods: A Complete Guide to Pod-Level Security Configuration
Complete guide to securing Kubernetes pods: security contexts, secrets management, image security, r...
Shamaila Mahmood
Shamaila Mahmood
October 24, 2025
Kubernetes
KubeKanvas Logo
Visual Kubernetes cluster design tool that helps you create, manage, and deploy your applications with ease.
Product
  • Features
  • Pricing
  • Templates
Resources
  • Blog
  • Tutorials
Company
  • About Us
  • Contact
  • Terms of Service
  • Privacy Policy
  • Responsible AI Policy
  • Impressum
XGitHubLinkedIn
© 2026 KubeKanvas. All rights reserved.

We had a stateful application that needed at least two replicas to serve traffic safely. During maintenance windows, we would drain nodes, patch kernels, or reboot worker nodes. In the middle of those operations, Kubernetes sometimes terminated both replicas at once or treated an eviction as if it were normal scaling. The result was intermittent downtime and failed deployments.

That changed when I introduced a PDB and started treating voluntary disruptions as a first-class part of our deployment strategy.


What I was doing before PDB

My app was deployed with a normal Deployment and a service selector. I relied on replica counts and maxUnavailable from my rolling update strategy.

The problem was this:

  • node drains and cluster upgrades would evict pods without any application-aware guardrails
  • the scheduler could choose to move pods in a way that left too few healthy instances available
  • when one replica failed during a disruption, the second replica was often removed too soon

In short, Kubernetes was doing its job, but I had not told it which disruptions were safe.

The real-world failure mode

I would run kubectl drain node-1 --ignore-daemonsets --delete-emptydir-data and assume the rest of the deployment would stay healthy.

Instead:

  • one pod was evicted from node-1
  • the controller immediately created a replacement pod
  • during the same window, another pod was rescheduled from node-2
  • suddenly the app had 0 or 1 healthy replica for a short period

This is exactly what Pod Disruption Budget prevents.


What I changed: the PDB manifest I added

I created a PodDisruptionBudget object and attached it to my application by using the same pod labels.

Here is the manifest I used:

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: webapp-pdb
spec:
  minAvailable: 2
  selector:
    matchLabels:
      app: webapp

That simple change created a cluster-level guardrail.

It also changed the way I thought about maintenance. A PDB is not a general availability promise for failures; it is a way to prepare for planned, voluntary disruptions before they happen.

Why this works

PodDisruptionBudget controls voluntary disruptions:

  • node drains
  • cluster upgrades
  • manual kubectl drain
  • eviction requests from the scheduler or pod disruption controllers

It does not block a pod from being killed by a node failure. It only protects the number of healthy pods during planned and controllable disruptions.

Another useful version

For lower-traffic services, I also use maxUnavailable:

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: backend-pdb
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app: backend

This says: "I can tolerate one pod being unavailable during a voluntary disruption, but no more."

You can specify either minAvailable or maxUnavailable in a PDB, but not both in the same object. The first expresses how many pods must remain healthy; the second expresses how many may be disrupted.


How to think about a PDB before disruption

A PDB should be used when you want to plan for voluntary evictions ahead of time. It is a simple contract that says: “During planned maintenance, this many pods should remain available” or “this many pods may be disrupted.”

That planning is what makes disruptions predictable.

Example workload patterns and PDB choices

  • Stateless frontends

    • Goal: keep most capacity available while a few pods are moved.
    • Practical choice: preserve about 90% of pods with minAvailable: 90%.
  • Single-instance stateful application

    • Goal: avoid unexpected termination of the only replica.
    • Good approach: often skip a PDB and accept downtime, because a single pod cannot stay available through disruption.
    • Alternative approach: use maxUnavailable: 0 and treat the PDB as a manual lock. The operator should contact the app owner before starting maintenance, delete the PDB to allow disruption, then recreate it afterwards.

Some workloads are fine with temporary full downtime; for those cases, skip the PDB and handle the disruption outside Kubernetes.


Why PDB gave me better results

After adding the PDB, the cluster started respecting a minimum availability budget for my application. The direct benefits were:

  • predictable maintenance behavior
  • safer node drains without dropping below the required number of healthy pods
  • fewer deployment rollouts that caused brief outages
  • easier reasoning about availability for stateful or high-traffic services

If I run kubectl drain now and the PDB cannot be honored, Kubernetes refuses the disruption until I either patch a node, scale the app, or change the PDB.

That means we avoid the worst-case scenario where two replicas are evicted at once and user traffic gets dropped.


How PDB works in plain language

Think of a PDB as a traffic signal for pod eviction.

It tracks two numbers:

  • CurrentHealthy: how many pods are currently ready and available
  • DesiredHealthy: how many pods must stay available according to minAvailable or maxUnavailable

The controller then computes AllowedDisruptions:

  • if you set minAvailable, it guarantees that number of pods stays healthy
  • if you set maxUnavailable, it allows that many pods to be unavailable

How the math works with replica count

The PDB is applied to the pod collection, so the values depend on the total replicas in the workload.

  • minAvailable with a number means exactly that many pods must stay ready.
  • minAvailable: 90% means ceil(0.9 * replicas) pods must stay ready.
  • maxUnavailable: 1 means exactly one pod may be disrupted at a time.
  • maxUnavailable: 20% means floor(0.2 * replicas) pods may be unavailable.

For example:

replicas = 5
minAvailable = 4
allowed disruptions = replicas - minAvailable = 5 - 4 = 1
minimum healthy pods = minAvailable = 4

Similarly

replicas = 5
maxUnavailable = 1
allowed disruptions = maxUnavailable = 1
minimum healthy pods = replicas - maxUnavailable = 5 - 1 = 4

If the cluster cannot keep enough healthy pods, voluntary evictions are blocked.

But a PDB is not a guarantee that pods will always stay up. If a node crashes, a pod is killed by OOM, or some other failure happens, the number of available pods can still drop below the budget. That is why PDB is described as protection for planned, voluntary disruption only.

Also, if you set maxUnavailable: 0 or minAvailable to 100% (or equal to the replica count), you are telling Kubernetes that you allow zero voluntary evictions. That means a node drain with one of those pods on it can hang forever until you remove or relax the budget. This is valid behavior: the drain is blocked because the PDB says the pod cannot be disrupted.

This is what makes planned maintenance safe.


Example: kubectl get pdb

After applying the PDB, I can inspect it with:

kubectl get pdb
kubectl describe pdb webapp-pdb

A healthy PDB shows output like this:

  • Current Healthy: 3
  • Desired Healthy: 2
  • Allowed Disruptions: 1

That tells you exactly whether the budget is being respected before you take an action.


What changed in my workflow

Before PDB:

  • I manually checked replica counts
  • I assumed kubectl drain would do the right thing
  • I fixed outages after they happened

After PDB:

  • I define disruption tolerance explicitly
  • the cluster enforces it automatically
  • I get a safer rollout and maintenance path

My team now uses PDBs as part of every critical production workload manifest. It is one of the first things we add after labels, service selectors, and resource requests.


Common mistakes to avoid

There are a few easy ways to misconfigure PDBs:

  • using the wrong selector so the PDB does not match the intended pods
  • attaching a PDB to a single-replica pod and thinking it guarantees high availability
  • setting minAvailable too high for your replica count
  • forgetting that PDB does not protect against node crash or pod eviction from OOM kill

A good rule of thumb is:

  • minAvailable: N for critical workloads where N replicas must stay up
  • maxUnavailable: M for workloads where up to M pods can be offline safely

When PDB is most useful

PodDisruptionBudgets are especially valuable for:

  • stateful or database workloads
  • front-end services serving live traffic
  • services with strict availability requirements
  • clusters undergoing frequent node upgrades or scaling events

For low-priority batch jobs, a PDB may not be necessary. But for anything that must keep serving traffic while cluster ops happen, it is a powerful guardrail.


Final takeaway

Pod Disruption Budgets are not magic, but they are the missing piece between "pods exist" and "pods stay healthy during maintenance." They turn implicit availability expectations into explicit rules that Kubernetes can enforce.

If you want your cluster to behave reliably during planned disruptions, start with a PDB, keep your selector correct, and choose the budget that matches your availability needs.

Once I did that, maintenance stopped being a gamble and became a predictable part of our deployment lifecycle.