{"canonical_url":"https://engineer.company/glossary/pod-disruption-budget/","content_markdown":"# Pod disruption budget\n\n## What it is\n\nA Pod disruption budget is a Kubernetes object that limits how many selected\nPods can be voluntarily evicted at the same time. It gives a workload owner a\nway to express how much availability the application should retain when an\noperator or an automated process asks the cluster to evict Pods. A budget can\nset a minimum available count or a maximum unavailable count.\n\nThe budget applies to requests that go through Kubernetes' Eviction API. A node\ndrain typically uses that API to move work away from the machine before\nmaintenance. When an eviction would violate a matching budget, the request can\nbe refused until enough selected Pods are healthy to proceed. The management\ntool can wait or retry. The budget's selector and the scale of the selected\nworkload matter, because they determine whose Pods contribute to the\ncalculation.\n\nInvoluntary disruptions are a separate part of the availability problem. A node\ncrash can make Pods unavailable immediately. Those losses affect how much\nadditional disruption the budget permits, but the budget cannot prevent the\ncrash. Direct Pod deletion is also separate from a request made through the\nEviction API. Workload controllers have their own rolling-update settings, which\nshould support the same service goals. Review each path by which an instance can\nleave service.\n\n## Why it matters\n\nA service may run with several replicas and still lose too much capacity during\nordinary maintenance. Imagine a node hosts two of three instances and a drain\ntries to evict both. If the service needs two healthy instances for its usual\nworkload, letting both leave together can produce a visible problem. A budget\ngives the cluster a way to allow progress while asking the drain to pause before\nremoving too much of that workload.\n\nA budget can also make operations slower by design. A replacement Pod may need\ntime to start or may remain pending when no node has enough available resources.\nThe drain cannot proceed if the other Pods already leave too little\navailability. This is useful information about a capacity limit, and somebody\nneeds to know how to act on it. Monitor outstanding evictions, scheduler events\nand actual service capacity while maintaining the cluster.\n\nChoose the setting from the consequence of losing replicas. Two healthy readers\nof a stateless catalogue may have enough capacity for expected traffic. A\nreplicated writer may need enough members to maintain agreement before accepting\nchanges. The number in a budget should follow the workload's measured or\nspecified requirement. Placement across failure domains, capacity for\nreplacement and graceful shutdown all affect whether that requirement is met in\npractice.\n\n## What it looks like in practice\n\nTake an illustrative service with three replicas and a budget requiring two to\nremain healthy. Begin a planned drain for a node with one replica. The cluster\ncan accept the eviction if the budget still allows it. After the workload\nreplaces the Pod, its readiness becomes part of the budget status. Test another\neviction before that replacement is ready and confirm the result matches the\nintended allowance. Use a workload and selector dedicated to the exercise.\n\nExercise a second situation where an unrelated node has already failed. Observe\nhow the reduced health changes what the drain can do to surviving Pods. The\napplication should continue meeting the availability required for safe work. The\noperator should also be able to explain why maintenance is waiting. In many\napplications an unavailable Pod that remains on a node creates a separate\noperational issue. Kubernetes exposes an unhealthy Pod eviction policy that can\ninfluence how the drain handles such instances.\n\nEngineer's\n[durable infrastructure case study](/portfolio/built-infrastructure-that-still-runs-years-later/)\ndescribes designing infrastructure for continuing operation with relatively\nlittle manual intervention. A workload disruption budget is one tool for\napplying that kind of operating discipline in Kubernetes. The illustrative drill\nturns a maintenance requirement into an observable result. A planned change can\ncontinue when there is enough healthy service, and its refusal gives the team a\nreason to fix capacity or the workload before proceeding.\n\n## Where it goes wrong\n\nA selector can cover the wrong Pods, or two budgets can overlap in a way that\nprevents eviction. Check the budget status to confirm which Pods match the\nselector and contribute to the calculation. Add a small policy or deployment\ntest when label conventions change. A budget that's correct for a Deployment\nwith three replicas may also need review if the workload's normal replica count\nchanges.\n\nPercentages introduce rounding and can make a small population behave\ndifferently from a larger one. Test the smallest supported replica count and a\npoint where a scaler might adjust it during maintenance. A budget that leaves no\nroom for ordinary disruption can block a drain, while a loose budget can allow\nmore loss than the service can sustain. Measure the real operation and decide\nwho can change the declared budget when the application is recovering.\n\nLook at single-replica workloads explicitly. Requiring the only replica to stay\nhealthy can make routine eviction wait indefinitely. Check whether the workload\ncan run a temporary additional replica or whether a short interruption is an\naccepted part of its maintenance. The owner can then choose a budget that makes\nthe cluster's behaviour match the documented responsibility.\n\nFinally, practice failure and maintenance separately. A budget manages a portion\nof voluntary eviction behaviour. The scheduler, the Service and the application\neach have their own role in replacement, traffic admission and capacity. A\nuseful rehearsal includes a denied eviction, a successful replacement and a\nsituation where a real outage reduces redundancy. Publish the procedure in terms\nan operator can confirm through the application's health and the cluster's\nstatus.\n\n## Further reading\n\n- [Kubernetes workload disruptions](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/).\n  Discusses the disruption model and where budgets apply.\n- [Configuring a Pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/).\n  Explains selectors, rounding and unhealthy Pod eviction policies.\n- [The Kubernetes Eviction API](https://kubernetes.io/docs/concepts/scheduling-eviction/api-eviction/).\n  Describes how eviction requests are submitted and refused when a budget\n  applies.\n\n\u003chttps://engineer.company/glossary/pod-disruption-budget/\u003e\n","date_modified":"2026-11-25T07:18:46Z","description":"See which Kubernetes evictions consult a PodDisruptionBudget and how to exercise it before draining a node.","formats":{"gemtext":"https://engineer.company/glossary/pod-disruption-budget/index.gmi","gopher":"https://engineer.company/glossary/pod-disruption-budget/gophermap","html":"https://engineer.company/glossary/pod-disruption-budget/","json":"https://engineer.company/glossary/pod-disruption-budget/index.json","markdown":"https://engineer.company/glossary/pod-disruption-budget/index.md","pdf":"https://engineer.company/glossary/pod-disruption-budget/index.pdf"},"kind":"page","language":"en","title":"What is a pod disruption budget?","url":"https://engineer.company/glossary/pod-disruption-budget/","version":1}