Interview Prep/Azure/AKS and Containers

An AKS node pool needs a different VM size. What's the safe way?

IntermediateScenarioAKS and Containers
Answer

Situation read → VM size is mostly immutable on a pool; add a new pool and migrate.

What I'd do →

  1. Add a new pool with the target size, same labels/taints, across zones
  2. Cordon old nodes: kubectl cordon -l agentpool=apps
  3. Drain gradually: kubectl drain <node> --ignore-daemonsets --delete-emptydir-data, respecting PDBs
  4. Verify pods are healthy on the new pool, then az aks nodepool delete -n apps
  5. For the default/system pool in Terraform, set temporary_name_for_rotation and let azurerm rotate it

Why → Workloads move gradually with PDB protection; no in-place risk.

Interview tip → Newer AKS supports resizing some pools in place, but the add-and-migrate pattern works everywhere.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on AKS and Containers