Interview Prep/Kubernetes/Resources, autoscaling and scheduling

A drain hangs forever on `Cannot evict pod as it would violate the pod's disruption budget`. What now?

AdvancedScenarioResources, autoscaling and scheduling
Answer

Situation read → A PDB with minAvailable equal to replicas blocks every eviction.

What I'd do →

  1. kubectl get pdb -A and check ALLOWED DISRUPTIONS equals 0
  2. Check the workload has too few replicas or unhealthy pods
  3. Fix the PDB (use maxUnavailable: 1) or scale up first
  4. Never force-delete as a habit
  5. As a last resort use --disable-eviction knowing it bypasses PDBs

Why → A PDB that allows zero disruptions makes the workload undrainable.

Interview tip → Say PDBs need to be reviewed in platform onboarding.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, autoscaling and scheduling