Learning center

EKS node group update failed with PodEvictionFailure: drain or join?

Read the failed update's error code with describe-update: PodEvictionFailure means new nodes joined and an old node would not drain. NodeCreationFailure means the new nodes never became Ready, so the drain never started. The two need opposite fixes: one in your workloads' disruption rules, the other in node launch and bootstrap.

Where each code comes from#

A managed node group version or launch template update runs in four phases. The error code tells you which phase stopped. Node update phases

  • Setup. EKS creates a new launch template version for the group's Auto Scaling group and points the group at it.
  • Scale up. EKS raises the Auto Scaling group's maximum and desired size and waits until at least one new node exists in every Availability Zone the group uses, every new node is Ready, and each carries the EKS labels. A failure here is NodeCreationFailure. Each node has 15 minutes from the size increase to bootstrap and join.
  • Upgrade. With the default strategy, EKS picks old nodes up to the group's maximum unavailable, cordons each once a new node is Ready, and drains its Pods. If the Pods don't leave within 15 minutes and the update was not forced, the update fails with PodEvictionFailure. The minimal strategy cordons every old node first and drains before it launches replacements, with the same 15-minute limit.
  • Scale down. EKS returns the Auto Scaling group to its earlier size.

So PodEvictionFailure says the new nodes were fine and an old node still had Pods that would not leave. NodeCreationFailure says EKS never got to draining. A third case sits before both: the Auto Scaling group could not launch the instances at all, which the node group reports as a health issue such as AsgInstanceLaunchFailures; see sorting node group health issues.

Read the failed update#

Use a read-only profile and replace the uppercase placeholders. List the node group's updates, then describe the failed one. describe-update · Update fields

aws eks list-updates \
  --profile PROFILE --region REGION --name CLUSTER --nodegroup-name NODEGROUP \
  --query 'updateIds' --output json --no-cli-pager

aws eks describe-update \
  --profile PROFILE --region REGION --name CLUSTER --nodegroup-name NODEGROUP --update-id UPDATE_ID \
  --query 'update.{status:status,type:type,created:createdAt,params:params[].{type:type,value:value},errors:errors[].{code:errorCode,message:errorMessage,resources:resourceIds}}' \
  --output json --no-cli-pager

status is Failed and errors explains why. params records what the update asked for, such as Version, ReleaseVersion or LaunchTemplateVersion. resources lists the resource IDs EKS associated with the error. ErrorDetail fields

errorCodePhaseWhat it establishesNext read
PodEvictionFailureUpgradeNew nodes were Ready; an old node kept Pods past 15 minutesDisruption budgets and tolerations of the Pods on the old node
NodeCreationFailureScale upNew nodes did not reach Ready with EKS labels in timeInstance launch, bootstrap and node join
Other codes, such as InsufficientFreeAddressesBefore the drainThe group could not get the nodes it neededThe node group's health issues

For PodEvictionFailure: find what held the node#

The EKS guide names two known causes. A PodDisruptionBudget is too strict, or several budgets select the same Pod. Or a workload tolerates every taint, so its Pods land back on the node EKS is trying to empty. Node update phases

Find the old nodes still in the group. EKS labels each node with its group and, for a custom launch template, the template version it came from. Node update phases

kubectl get nodes -l eks.amazonaws.com/nodegroup=NODEGROUP \
  -L eks.amazonaws.com/nodegroup-image,eks.amazonaws.com/sourceLaunchTemplateVersion

A cordoned node with the old image or template version is where the drain stopped. List what still runs on it, then every disruption budget:

kubectl get pods --all-namespaces --field-selector spec.nodeName=NODE_NAME -o wide

kubectl get pdb --all-namespaces \
  -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,MIN:.spec.minAvailable,MAX:.spec.maxUnavailable,ALLOWED:.status.disruptionsAllowed,SELECTOR:.spec.selector.matchLabels

Match the Pods' labels to the selectors. A budget that selects a Pod on the node and shows ALLOWED at 0 blocks its eviction: a minAvailable equal to the replica count, a maxUnavailable of 0, or a workload whose other replicas are not healthy. Two budgets whose selectors both match the same Pod are the second known cause. If nothing blocks and the node has Pods, check those Pods' tolerations for one that matches every taint, which brings them back after each eviction.

What to change#

Change the workload, then run the update again. Each of these is a manifest change for review:

  • A budget with no room. Allow at least one disruption, for example by adding a replica or lowering minAvailable, so one Pod can move while the others serve.
  • Overlapping budgets. Keep one budget per set of Pods.
  • Tolerate-all workloads. Narrow the toleration to the taints the workload actually needs.

Forcing the update is the alternative, and it is a change with a cost. With --force, EKS updates the group even when a Pod can't be drained because of a disruption budget, and it can terminate an old node whether or not Pods still run on it. The console calls this a force update that doesn't respect Pod disruption budgets. Whatever the budget protected stops at once on that node. UpdateNodegroupVersion · Update a managed node group

# Change: replaces nodes without respecting Pod disruption budgets.
aws eks update-nodegroup-version \
  --profile PROFILE --region REGION --cluster-name CLUSTER --nodegroup-name NODEGROUP \
  --launch-template name=LAUNCH_TEMPLATE_NAME,version=VERSION --force --no-cli-pager

Shrinking the group to remove old nodes is not a gentler path. A change to the scaling configuration terminates nodes through an Auto Scaling scale-in and evicts Pods without honoring their budgets. Update a managed node group

Confirm on the next update: describe-update returns Successful, every node in the group shows the new image or template version, and each budget returns to its usual ALLOWED value.

An illustrative update#

This fixture is fictional. Node group orders-ng in cluster prod moves from launch template version 7 to 8 with maxUnavailable 1.

In the first outcome, describe-update returns PodEvictionFailure. Three new nodes from version 8 are Ready, and one cordoned node still shows version 7. It runs one Pod of orders-api, which has three replicas and a budget with minAvailable: 3. ALLOWED is 0, so no eviction can ever succeed. Changing the budget to maxUnavailable: 1 and rerunning the update lets the node drain.

In the second outcome, describe-update returns NodeCreationFailure. The Auto Scaling group launched instances from version 8, but kubectl get nodes shows none of them. Version 8 replaced the user data, and the nodes never ran the EKS bootstrap. No Pod was ever evicted; changing the budget would not help, and --force would not either, because force applies only to the drain.

Where this read misleads#

NodeCreationFailure is not always a bootstrap fault. During an update's scale-up, EKS lists insufficient capacity in the Availability Zone and the account's EC2 instance limits among its known causes, next to custom user data, nodes that never reach Ready, and the 15-minute limit. Check whether instances launched before you debug the join. Node update phases · Launch failures and capacity

ALLOWED is a snapshot. A budget can show room after the update failed because the Pods it protects recovered, and a budget with room can still block when the replacement Pods have nowhere to schedule. Read the Pods' events and the scheduler's reasons for any Pod left Pending.

The update error does not name the Pod. EKS reports the code and a message; the Pod and budget come from your cluster. For the other deploy records AWS leaves, see the signature table.

Questions#

What causes PodEvictionFailure in an EKS managed node group update?

EKS could not drain an old node within 15 minutes. The EKS guide names a PodDisruptionBudget that allows no disruption or several budgets on the same Pod, and workloads that tolerate every taint so their Pods return to the node.

What does --force do on update-nodegroup-version?

Force replaces nodes without respecting Pod disruption budgets, so the Pods those budgets protect can stop at once. Fix the budget when you can; force only when you accept that disruption.

How is PodEvictionFailure different from NodeCreationFailure?

PodEvictionFailure happens in the upgrade phase, after the new nodes are Ready, when an old node will not drain. NodeCreationFailure happens in the scale-up phase, when new nodes do not launch, bootstrap or join in time.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading