Interview Prep/Azure/AKS and ACR Errors

AKS upgrade fails: `(UpgradeFailed) Drain node aks-apps-12345-vmss000002 failed when evicting pod web-7d9... failed with Too Many Requests error. This is often caused by a restrictive Pod Disruption Budget (PDB) policy.`

IntermediateTroubleshootingAKS and ACR Errors
Answer

Likely causes → A PDB with maxUnavailable: 0 or minAvailable equal to replicas, or a single-replica deployment with a PDB.

Diagnose →

kubectl get pdb -A
kubectl get pdb web -n shop -o yaml

Fix →

  1. Scale the deployment up or relax the PDB to allow 1 disruption
  2. Re-run: az aks nodepool upgrade ... (it resumes)
  3. Or use undrainable node behaviour (--undrainable-node-behavior Cordon) to quarantine blocked nodes and continue

Prevent → Policy that PDBs must allow at least one disruption; at least 2 replicas for PDB-protected apps.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on AKS and ACR Errors