Home / AI & GenAI

AI & GenAIRunbookAdvanced

Sev1: a node pool upgrade drained every GPU inference pod at once and the model endpoint went down

A Kubernetes node upgrade or consolidation evicted all model-serving replicas faster than they could reload weights. Stop the rollout, bring replicas back, and add PDBs, real readiness probes and safe surge settings.

Deepak Bhardwaj6 min read

Applies toAKS and EKS GPU node pools, Karpenter v1, Kubernetes 1.28+, self-hosted model servers (vLLM, TGI, Triton, KServe)

Symptoms

  • The self-hosted LLM endpoint returns 502/503 for several minutes, or much longer, during a maintenance window or an auto-upgrade.
  • kubectl get pods shows all model-server replicas Pending, ContainerCreating or Running but not Ready at the same time.
  • Events show Evicted, Drain node, NodeNotSchedulable or Karpenter Disrupting messages for every GPU node.
  • New pods spend minutes pulling a large image and loading weights before they can serve.

Normal web pods restart in seconds, so a fast drain barely matters for them. A model server can take 5–20 minutes to download and load weights. If the upgrade drains the next node before the previous replica is truly serving, capacity drops to zero.

Step 1: see what is draining (3 minutes)

kubectl get nodes -L kubernetes.azure.com/agentpool,node.kubernetes.io/instance-type \
  -o wide | grep -Ei "gpu|SchedulingDisabled"

kubectl -n llm get pods -o wide
kubectl get events -A --sort-by=.lastTimestamp | grep -Ei "drain|evict|disrupt|upgrade" | tail -30
kubectl -n llm get pdb

AKS: check the pool state and upgrade settings:

az aks nodepool show -g rg-aks -n gpupool --cluster-name aks-prod \
  --query "{state:provisioningState, version:orchestratorVersion, image:nodeImageVersion, upgrade:upgradeSettings}" -o json

EKS managed node group:

aws eks describe-nodegroup --cluster-name eks-prod --nodegroup-name gpu \
  --query "nodegroup.{status:status, version:version, release:releaseVersion, update:updateConfig}"
aws eks list-updates --name eks-prod --nodegroup-name gpu
Finding Cause
No PDB for the model server Nothing stops the drain from evicting every replica
PDB exists, but pods went Ready before weights loaded Readiness probe passes too early, so the drain continues to the next node
All replicas were on one or two nodes No topology spread; one drain removes most capacity
New surge node Pending / AllocationFailed No GPU quota or capacity for surge, so the upgrade falls back to draining existing nodes
Karpenter Drifted or Underutilized on all GPU nodes NodePool change or consolidation replaced nodes without a disruption budget
Auto-upgrade or node image channel ran at peak time No maintenance window configured

Step 2: stop the rollout and restore capacity

Pause the upgrade

AKS can abort the running operation on a node pool. Nodes already upgraded stay upgraded, and the rest stay on the old version:

az aks nodepool operation-abort -g rg-aks --cluster-name aks-prod -n gpupool

For Karpenter, block further voluntary disruption of the GPU NodePool by setting its budget to zero nodes:

kubectl patch nodepool gpu --type merge -p '{"spec":{"disruption":{"budgets":[{"nodes":"0"}]}}}'

EKS managed node group updates can't be paused mid-way in the same way. Protect the remaining replicas with a PDB (Step 3), which the drain respects, and add capacity.

Bring replicas back

  • Uncordon healthy nodes that the upgrade cordoned but hasn't drained yet:
kubectl uncordon <node>
  • If GPU capacity is short, route traffic at the gateway to a fallback model or a hosted API until replicas are Ready.
  • Don't delete and recreate pods repeatedly. Each restart starts the weights load again.

Warning

Aborting an upgrade leaves the pool with mixed node versions. That is supported for a short time, but plan to finish the upgrade in a proper window with the settings in Step 3, not weeks later.

Step 3: make the next drain safe

PodDisruptionBudget

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: llama-8b
  namespace: llm
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app: llama-8b

With 2+ replicas, maxUnavailable: 1 lets a drain move one replica at a time. With a single replica, a PDB only blocks the drain. Upgrades then stall or time out, so run at least two replicas for anything Sev1-critical.

Readiness that means "serving"

The PDB counts a pod as available when it is Ready. Ready must mean weights loaded and the server accepts requests:

startupProbe:
  httpGet: { path: /health, port: 8000 }
  periodSeconds: 10
  failureThreshold: 120        # up to 20 minutes for weights to load
readinessProbe:
  httpGet: { path: /health, port: 8000 }
  periodSeconds: 10
  failureThreshold: 3

vLLM's /health returns 200 once the engine is up. For other servers, use their ready endpoint (for example Triton's /v2/health/ready). Avoid a TCP probe on the port, which can pass before the model is loaded.

Spread replicas across nodes

topologySpreadConstraints:
- maxSkew: 1
  topologyKey: kubernetes.io/hostname
  whenUnsatisfiable: DoNotSchedule
  labelSelector:
    matchLabels: { app: llama-8b }

Surge and drain settings

AKS: surge one GPU node at a time, and give drains time to respect the PDB:

az aks nodepool update -g rg-aks --cluster-name aks-prod -n gpupool \
  --max-surge 1 --drain-timeout 60

Surge nodes need spare GPU quota in the region. Confirm it before the window, or the upgrade will fail or stall. Newer CLI versions also offer --node-soak-duration to wait between nodes; check az aks nodepool update --help.

EKS: set updateConfig to one node at a time:

aws eks update-nodegroup-config --cluster-name eks-prod --nodegroup-name gpu \
  --update-config maxUnavailable=1

Karpenter: keep a non-zero but small budget, and limit when disruption may happen:

spec:
  disruption:
    consolidationPolicy: WhenEmpty
    budgets:
    - nodes: "1"
    - nodes: "0"
      schedule: "0 8 * * mon-fri"   # no voluntary disruption during business hours
      duration: 10h

For a pod that must never be moved voluntarily, annotate it with karpenter.sh/do-not-disrupt: "true", and accept that its node won't be upgraded until you move it.

Tip

Cut the reload time as well as limiting disruption. Pre-pull the image on GPU nodes, and cache weights on a local NVMe or a shared volume, so a moved replica becomes Ready in minutes instead of tens of minutes.

Step 4: confirm

  • All replicas Ready and spread across different nodes (kubectl -n llm get pods -o wide).
  • kubectl -n llm get pdb shows ALLOWED DISRUPTIONS of 1.
  • Gateway error rate and time to first token back to baseline.
  • A test drain of one GPU node in staging moves one replica at a time with no 5xx at the gateway.

Prevent it next time

  • Set a planned maintenance window for AKS auto-upgrade and node image updates (az aks maintenanceconfiguration), outside peak inference hours.
  • Treat model-server PDBs, startup probes and topology spread as mandatory in the Helm chart or base manifest, enforced by policy (Azure Policy, Kyverno or Gatekeeper).
  • Run at least N+1 replicas for production models, sized so losing one still serves peak load.
  • Check GPU quota for surge before every planned upgrade.
  • Rehearse a node pool upgrade in staging on the same GPU type and record how long a replica takes to become Ready. Use that number to set drain timeouts.