Interview Prep/SRE & Reliability/Reliability Patterns in Production

A node drain for maintenance hangs with `Cannot evict pod as it would violate the pod's disruption budget.`

BeginnerTroubleshootingReliability Patterns in Production
Answer

Likely causes → A PodDisruptionBudget allows zero disruptions right now: minAvailable equals replica count, a single-replica deployment has minAvailable: 1, or some replicas are already unhealthy.

Diagnose →

kubectl get pdb -A
kubectl describe pdb -n shop checkout

Look at ALLOWED DISRUPTIONS.

Fix → Scale up so the PDB permits one disruption, fix unhealthy pods, or adjust the PDB (maxUnavailable: 1). Do not force-delete pods unless you accept the impact.

Prevent → At least 2 replicas for anything with a PDB, and use maxUnavailable rather than minAvailable equal to replicas.

All SRE & Reliability questions

More on Reliability Patterns in Production