liveBook · Manning

Pod disruption budget

As explained in Kubernetes for Developers

A Pod Disruption Budget is a Kubernetes policy that limits the number of Pods from a workload that can be voluntarily disrupted at once.

A Pod Disruption Budget (PDB) limits how many Pods from a workload may be unavailable during disruptions. During node maintenance, Kubernetes uses the budget to avoid evicting too many replicas at once. section 12.1.3

Configure a PDB by choosing:

  • maxUnavailable to limit the number of Pods that may be unavailable. section 12.1.3
  • minAvailable to specify how many replicas must remain available. section 12.1.3
  • A selector that identifies the workload’s Pods. section 12.1.3

Protecting a replicated workload

A PDB with maxUnavailable: 1 for Pods labeled pod: timeserver-pod ensures that Kubernetes does not make more than one matching Pod unavailable during disruption. When draining a node, Kubernetes waits for enough Pods to remain available before deleting others. section 12.1.3

How Kubernetes for Developers covers it

How deep it goes
Explains node draining, replica unavailability, maxUnavailable, minAvailable, and selectors, but stops short of broader policy details.
Examples
Uses a timeserver PDB manifest with maxUnavailable: 1 and a pod: timeserver-pod selector.
What it assumes
Assumes familiarity with Pods, replicas, workloads, and node draining while explaining disruption protection through a concrete maintenance scenario.
What you can do after
Configure a Kubernetes Pod Disruption Budget that limits unavailable replicas during node maintenance.
How it connects
Connects Pod Disruption Budgets with Kubernetes, Deployments, StatefulSets, node draining, rolling updates, and replica availability.

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.