EKS AL2 to AL2023 Migration: nodeadm, User Data and Zero-Downtime Node Groups (2026)

An EKS AL2 to AL2023 migration is no longer optional. Amazon Linux 2 reached end of support on 30 June 2026, and Amazon EKS stopped publishing EKS-optimized AL2 AMIs on 26 November 2025. Kubernetes 1.32 was the last version with AL2 node images, so any cluster that wants to move to 1.33 or later needs new nodes.

The switch is more than an AMI ID swap. AL2023 replaces bootstrap.sh with nodeadm, requires IMDSv2 by default, runs cgroup v2, and drops tools such as amazon-linux-extras and EPEL.

This guide walks through every difference that matters, then shows a zero-downtime EKS AL2 to AL2023 migration for managed node groups, self-managed nodes and Karpenter, with Terraform, YAML and Bash examples.


Table of Contents

  1. Technical Overview & Background
  2. What Changes Between AL2 and AL2023
  3. Core System Prerequisites
  4. Step-by-Step EKS AL2 to AL2023 Migration
  5. Architecture & Component Breakdown
  6. Real-World Use Cases & Enterprise Examples
  7. Troubleshooting, Edge Cases & Best Practices
  8. FAQ
  9. Summary & Key Takeaways

Technical Overview & Background

Amazon Linux 2023 (AL2023) is the successor to Amazon Linux 2. It is based on a Fedora-derived package set, ships a Linux 6.1 kernel instead of 5.10, and is supported until June 2029.

For EKS worker nodes, AWS publishes EKS-optimized AMIs for AL2023 and Bottlerocket. Both use cgroup v2 and a modern kernel. AL2 does neither.

The deadlines behind the migration

DateWhat happened
Kubernetes 1.32Last Kubernetes version with EKS-optimized AL2 AMIs
26 Nov 2025EKS stopped publishing AL2 and AL2-accelerated AMIs for all versions
30 Jun 2026Amazon Linux 2 operating system reached end of support
23 Mar 2027EKS 1.32 extended support ends; control planes are auto-upgraded
June 2029Planned end of support for Amazon Linux 2023

Existing AL2 nodes keep running. They simply stop receiving AMI updates, kernel patches and security fixes. Extended support for the Kubernetes version does not cover the AL2 operating system, so paying for it does not remove the need to migrate.

Why it blocks Kubernetes upgrades

A cluster on 1.32 with AL2 nodes cannot upgrade its node groups to 1.33, because no AL2 image exists for 1.33. The control plane can move ahead, but the version skew grows with every release.

Meanwhile 1.32 is already in paid extended support at $0.60 per cluster-hour. Our EKS extended support cost guide shows how quickly that adds up.

What Changes Between AL2 and AL2023

These are the differences that break a real EKS AL2 to AL2023 migration. Review each one against your user data, DaemonSets and applications.

1. nodeadm replaces bootstrap.sh

On AL2, user data called /etc/eks/bootstrap.sh with flags such as --kubelet-extra-args. On AL2023, node setup is handled by nodeadm, configured with a YAML NodeConfig object.

nodeadm runs in two systemd phases:

  • nodeadm-config runs before user data and writes the baseline containerd and kubelet configuration
  • nodeadm-run runs after user data and starts the kubelet

AWS explicitly warns against running nodeadm init yourself in user data or a custom AMI. Running it twice can misconfigure ENIs.

2. Cluster details must be explicit for custom setups

AL2 discovered the API endpoint and certificate authority with a DescribeCluster call at boot. AL2023 does not, because that extra API call could be throttled during large scale-ups.

For self-managed nodes or launch templates with a custom AMI ID, you must supply apiServerEndpoint, certificateAuthority and the service cidr. Managed node groups without a custom AMI and Karpenter fill these in for you.

3. IMDSv2 required, hop limit 1 by default

AL2023 requires IMDSv2. When you do not use a launch template, the metadata hop limit defaults to 1, so containers cannot reach the node’s instance metadata or its IAM credentials.

Pods that silently relied on the node role, such as older controllers or SDKs without IRSA, will fail with credential errors. The right fix is EKS Pod Identity or IRSA, not a wider hop limit.

4. cgroup v2 only (in practice)

AL2023 uses the unified cgroup v2 hierarchy. AWS states that cgroup v1 on AL2023 is not a recommended or supported configuration. See our Kubernetes cgroup v2 migration guide for the application side.

The most common failure is Java: JDK 8 builds older than 8u372 do not detect cgroup v2 memory limits and can be OOMKilled.

5. Packages and tooling

  • yum becomes dnf (a yum alias still exists)
  • amazon-linux-extras is gone
  • EPEL is not supported
  • 32-bit applications are deprecated
  • Kernel moves from 5.10 to 6.1

Any user data or AMI build script that installs packages needs review.

6. Accelerated workloads

  • NVIDIA GPU: use the AL2023 NVIDIA AMI variants or Bottlerocket NVIDIA variants
  • AWS Neuron: since Neuron 2.20, the Neuron Runtime no longer supports AL2, so Inferentia and Trainium workloads must move

Core System Prerequisites

Confirm these before starting an EKS AL2 to AL2023 migration:

  • Amazon VPC CNI v1.16.2 or later
  • eksctl v0.176.0 or later if you manage node groups with eksctl
  • Terraform or OpenTofu with a current AWS provider and, if used, a recent terraform-aws-modules/eks version
  • Pod Identity or IRSA for every workload that calls AWS APIs
  • cgroup v2-aware runtimes: JDK 8u372+, 11.0.16+ or 15+; current monitoring and security agents
  • Sufficient subnet IPs and quota to run old and new node groups side by side
  • PodDisruptionBudgets on critical workloads so drains do not take them offline

Step-by-Step EKS AL2 to AL2023 Migration

The safest EKS AL2 to AL2023 migration pattern is blue/green: create AL2023 node groups next to the AL2 ones, move workloads, then delete the old groups.

Plan the migration in waves

Large fleets should not run an EKS AL2 to AL2023 migration on every node group at once. A simple wave plan keeps risk low:

  1. Wave 1 – dev and test clusters. Shake out user data, IMDS and runtime problems where failures are cheap.
  2. Wave 2 – stateless production node groups. Web and API tiers recover quickly from pod rescheduling.
  3. Wave 3 – stateful and batch pools. Databases, queues and long-running jobs need careful drain timing and PodDisruptionBudgets.
  4. Wave 4 – GPU and specialised pools. Capacity is scarce, so schedule these when replacement instances are confirmed.

Give each wave an owner, a date and a rollback trigger.

Step 1: Inventory AL2 nodes

The node object already reports its operating system image:

kubectl get nodes -L eks.amazonaws.com/nodegroup \
  -o custom-columns=NAME:.metadata.name,\
NODEGROUP:.metadata.labels.eks\.amazonaws\.com/nodegroup,\
OS:.status.nodeInfo.osImage,\
KERNEL:.status.nodeInfo.kernelVersion,\
KUBELET:.status.nodeInfo.kubeletVersion

Any node showing Amazon Linux 2 and a 5.10 kernel needs replacing. Also list the managed node groups and their AMI types:

CLUSTER=prod-eu-1
for ng in $(aws eks list-nodegroups --cluster-name "$CLUSTER" --query 'nodegroups[]' --output text); do
  aws eks describe-nodegroup --cluster-name "$CLUSTER" --nodegroup-name "$ng" \
    --query 'nodegroup.[nodegroupName,amiType,version,launchTemplate.name]' --output text
done

AMI types beginning with AL2_ are the ones to migrate.

Step 2: Find workloads that depend on node credentials

Pods without a Pod Identity association or an IRSA annotation may be using the node role through IMDS:

kubectl get pods -A -o json | jq -r '
  .items[]
  | select(.spec.serviceAccountName != null)
  | "\(.metadata.namespace)/\(.spec.serviceAccountName)"' | sort -u > sa-in-use.txt

kubectl get sa -A -o json | jq -r '
  .items[]
  | select(.metadata.annotations["eks.amazonaws.com/role-arn"] != null)
  | "\(.metadata.namespace)/\(.metadata.name)"' | sort -u > sa-irsa.txt

comm -23 sa-in-use.txt sa-irsa.txt

Compare the remaining service accounts with aws eks list-pod-identity-associations --cluster-name "$CLUSTER". Anything that calls AWS APIs and has neither mechanism needs one before the move.

Step 3: Translate bootstrap.sh user data to NodeConfig

A typical AL2 launch template ran:

#!/bin/bash
/etc/eks/bootstrap.sh prod-eu-1 \
  --kubelet-extra-args '--node-labels=workload=general --max-pods=58 --register-with-taints=dedicated=batch:NoSchedule'

On AL2023, the same intent becomes a MIME multi-part user data document with a NodeConfig part:

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="BOUNDARY"

--BOUNDARY
Content-Type: application/node.eks.aws

---
apiVersion: node.eks.aws/v1alpha1
kind: NodeConfig
spec:
  cluster:
    name: prod-eu-1
    apiServerEndpoint: https://ABCDEF1234567890.gr7.eu-west-1.eks.amazonaws.com
    certificateAuthority: LS0tLS1CRUdJTi...
    cidr: 172.20.0.0/16
  kubelet:
    config:
      maxPods: 58
      registerWithTaints:
        - key: dedicated
          value: batch
          effect: NoSchedule
    flags:
      - --node-labels=workload=general

--BOUNDARY--

The cluster block is only required for self-managed nodes and custom AMIs. For managed node groups using the EKS AMI, include just the kubelet section.

Step 4: Add custom node setup with a drop-in, not nodeadm init

If you need extra configuration, such as a sysctl or an additional label, use a shell part that writes a nodeadm drop-in:

#!/bin/bash
set -euo pipefail

# Runs between nodeadm-config and nodeadm-run
cat > /etc/eks/nodeadm.d/10-team-labels.yaml <<'EOF'
apiVersion: node.eks.aws/v1alpha1
kind: NodeConfig
spec:
  kubelet:
    flags:
      - --node-labels=team=payments
EOF

dnf install -y amazon-cloudwatch-agent
sysctl -w vm.max_map_count=262144

Never call nodeadm init here. The AMI runs it for you in the correct order.

Step 5: Create the AL2023 managed node group with Terraform

For a managed-node EKS AL2 to AL2023 migration, create the new group beside the old one, with the same labels and taints so workloads can schedule there:

resource "aws_eks_node_group" "general_al2023" {
  cluster_name    = aws_eks_cluster.main.name
  node_group_name = "general-al2023"
  node_role_arn   = aws_iam_role.node.arn
  subnet_ids      = var.private_subnet_ids
  version         = aws_eks_cluster.main.version

  ami_type       = "AL2023_x86_64_STANDARD"   # AL2023_ARM_64_STANDARD for Graviton
  instance_types = ["m7i.large", "m6i.large"]

  scaling_config {
    desired_size = 3
    min_size     = 3
    max_size     = 12
  }

  update_config {
    max_unavailable_percentage = 25
  }

  labels = {
    workload = "general"
    os       = "al2023"
  }

  launch_template {
    id      = aws_launch_template.al2023.id
    version = aws_launch_template.al2023.latest_version
  }
}

resource "aws_launch_template" "al2023" {
  name_prefix = "general-al2023-"
  user_data   = base64encode(file("${path.module}/nodeconfig-userdata.mime"))

  metadata_options {
    http_tokens                 = "required"
    http_put_response_hop_limit = 1          # keep pods away from node credentials
  }
}

Keep the hop limit at 1 unless a specific, reviewed workload needs node credentials.

Step 6: Migrate Karpenter node pools

For Karpenter v1, point the EC2NodeClass at the AL2023 alias:

apiVersion: karpenter.k8s.aws/v1
kind: EC2NodeClass
metadata:
  name: default
spec:
  amiSelectorTerms:
    - alias: al2023@latest      # pin a version in production, e.g. al2023@v20261001
  role: KarpenterNodeRole-prod-eu-1
  subnetSelectorTerms:
    - tags:
        karpenter.sh/discovery: prod-eu-1
  securityGroupSelectorTerms:
    - tags:
        karpenter.sh/discovery: prod-eu-1
  metadataOptions:
    httpTokens: required
    httpPutResponseHopLimit: 1

Karpenter’s drift detection then replaces AL2 nodes with AL2023 nodes automatically, respecting your disruption budgets. Set a NodePool disruption budget first so it does not replace everything at once.

Step 7: Move workloads and drain the AL2 groups

This is the core of the EKS AL2 to AL2023 migration. Cordon all AL2 nodes first so nothing new lands there, then drain them gradually:

OLD_NG=general-al2
kubectl cordon -l eks.amazonaws.com/nodegroup="$OLD_NG"

for node in $(kubectl get nodes -l eks.amazonaws.com/nodegroup="$OLD_NG" -o name); do
  kubectl drain "$node" --ignore-daemonsets --delete-emptydir-data --timeout=10m
  sleep 60   # let replicas settle and alarms catch up
done

Watch error rates, pod restarts and OOMKilled events during the drain. Restarts on AL2023 often point to cgroup v2 or IMDS issues.

Step 8: Delete the AL2 node group

When the old nodes are empty and the new group has handled a normal day of traffic, remove the AL2 group:

aws eks delete-nodegroup --cluster-name "$CLUSTER" --nodegroup-name general-al2
aws eks wait nodegroup-deleted --cluster-name "$CLUSTER" --nodegroup-name general-al2

Remove the old launch template and AL2 references from Terraform in the same change, so nobody recreates them.

Architecture & Component Breakdown

AL2023 node boot sequence

  1. EC2 launches the instance with the EKS-optimized AL2023 AMI and your user data.
  2. nodeadm-config reads NodeConfig from user data and /etc/eks/nodeadm.d/, then writes containerd and kubelet config.
  3. cloud-init runs your shell user data parts.
  4. nodeadm-run applies final settings and starts containerd and the kubelet.
  5. The kubelet registers with the EKS API server using the node IAM role.
  6. The VPC CNI assigns pod IPs, and the node becomes Ready.
EKS AL2 to AL2023 migration: nodeadm boot sequence and blue/green node group migration steps
The AL2023 nodeadm boot sequence and the blue/green node group migration path off Amazon Linux 2.

AL2 vs AL2023 at a glance

AreaAmazon Linux 2Amazon Linux 2023
Support end30 Jun 2026 (ended)June 2029
Kernel5.106.1
Node bootstrapbootstrap.sh flagsnodeadm NodeConfig YAML
Cluster discoveryDescribeCluster at bootExplicit for custom setups
IMDSv1 and v2IMDSv2 required
cgroupv1v2
Package manageryum, amazon-linux-extrasdnf, no extras or EPEL
Last EKS version1.32All current versions

Should you pick Bottlerocket instead?

Bottlerocket is a minimal, container-only OS with an immutable root filesystem, fast boot and automatic updates. It also uses cgroup v2 and offers FIPS variants.

  • Choose AL2023 if you need SSH-style debugging, custom packages or familiar Linux tooling.
  • Choose Bottlerocket if you want the smallest attack surface and are happy to configure nodes only through its API settings.

Many teams run AL2023 for general workloads and Bottlerocket for security-sensitive pools.

Real-World Use Cases & Enterprise Examples

Scenario 1: Stuck on EKS 1.32 with AL2 managed node groups

A SaaS company runs three EKS clusters on 1.32 with standard AL2 managed node groups and no custom AMI. They create AL2023 node groups with Terraform, copy labels and taints, and drain the old groups one at a time.

With the EKS AL2 to AL2023 migration done, they can upgrade to 1.33 and leave extended support. The node migration is what unblocks the version upgrade.

Scenario 2: Custom launch templates with heavy user data

An enterprise uses a 200-line bootstrap.sh wrapper that installs agents, tunes sysctls and passes kubelet flags. They split it into a NodeConfig part for kubelet settings and a shell drop-in for agents and sysctls.

Package installs move from yum and amazon-linux-extras to dnf. Two agents that only existed in EPEL are replaced with vendor RPMs.

Scenario 3: Legacy Java services

After moving to AL2023, several Java 8 services restart repeatedly with OOMKilled. The images use JDK 8u352, which does not detect cgroup v2 limits.

Rebuilding on JDK 8u372+, and setting -XX:MaxRAMPercentage=75, fixes the restarts. The team adds a CI check that rejects base images older than the cgroup v2-aware releases.

Scenario 4: Controllers losing AWS credentials

An old ingress controller and an image-sync job had relied on the node IAM role. On AL2023, with hop limit 1, they fail with credential errors.

The team creates EKS Pod Identity associations with least-privilege roles and removes those permissions from the node role. Security improves as a side effect of the migration.

Troubleshooting, Edge Cases & Best Practices

Common EKS AL2 to AL2023 migration errors and fixes

Nodes never join the cluster

Check the user data format. A NodeConfig must be in a MIME part with Content-Type: application/node.eks.aws. For custom AMIs, confirm the endpoint, certificate authority and service CIDR are present. Read journalctl -u nodeadm-config -u nodeadm-run on the instance.

Pods get “unable to locate credentials” or IMDS timeouts

The workload depended on node credentials. Add Pod Identity or IRSA. Only raise the hop limit to 2 as a short, reviewed exception.

ENI or networking misconfiguration after boot

Your user data or AMI runs nodeadm init again. Remove the extra call and use drop-in files instead.

Java or Node.js pods OOMKilled

The runtime does not read cgroup v2 limits. Upgrade the runtime in the image.

amazon-linux-extras: command not found in user data

The tool does not exist on AL2023. Install packages with dnf or bake them into a custom AMI.

GPU pods pending on new nodes

Use an AL2023 NVIDIA AMI type and confirm the NVIDIA device plugin or GPU Operator version supports it.

EKS AL2 to AL2023 migration rollback plan

Blue/green makes rolling back an EKS AL2 to AL2023 migration simple:

  1. Keep the AL2 node group at its original size until the AL2023 group has run a full business cycle.
  2. If problems appear, uncordon the AL2 nodes and cordon the AL2023 nodes.
  3. Drain the AL2023 nodes so pods reschedule back onto AL2.
  4. Fix the root cause, then repeat the move.

Remember that rollback to AL2 is temporary; it receives no patches.

EKS AL2 to AL2023 migration best practices

  • Migrate node groups before upgrading past 1.32.
  • Use blue/green node groups, not in-place AMI swaps, unless you already use custom AMIs and have tested them.
  • Fix credentials first: move every AWS-calling workload to Pod Identity or IRSA.
  • Audit runtimes for cgroup v2 before the first drain.
  • Keep the hop limit at 1 and treat exceptions as security debt.
  • Pin AMI versions in production and update them deliberately.
  • Delete the AL2 groups and launch templates from code once the migration is done.

FAQ

Is Amazon Linux 2 still supported on EKS?

No. Amazon EKS stopped publishing EKS-optimized Amazon Linux 2 AMIs on 26 November 2025, and the Amazon Linux 2 operating system reached end of support on 30 June 2026. Existing AL2 nodes keep running but receive no further patches, and Kubernetes 1.32 is the last EKS version with AL2 images.

What replaces bootstrap.sh on AL2023 EKS nodes?

AL2023 uses nodeadm, configured with a YAML NodeConfig object in a MIME user data part with the content type application/node.eks.aws. Kubelet settings such as maxPods, labels and taints move from –kubelet-extra-args into the NodeConfig kubelet section.

Why can’t my pods get AWS credentials after moving to AL2023?

AL2023 requires IMDSv2, and without a launch template the metadata hop limit defaults to 1, so containers cannot reach the node’s instance credentials. Give those workloads their own IAM role through EKS Pod Identity or IRSA instead of relying on the node role.

Can I do an in-place AMI upgrade from AL2 to AL2023?

Only if your managed node group already uses a custom AMI in a launch template, and your user data has been translated to nodeadm. Node groups that use the standard EKS AMI type need a blue/green migration: create a new AL2023 node group, move the pods, then delete the AL2 group.

Should I choose AL2023 or Bottlerocket for EKS nodes?

Choose AL2023 if you need familiar Linux tooling, custom packages or host-level debugging. Choose Bottlerocket if you want a minimal, immutable, container-only OS with a smaller attack surface. Both use cgroup v2 and are fully supported for current EKS versions.

Summary & Key Takeaways

  • Amazon Linux 2 reached end of support on 30 June 2026, and EKS stopped publishing AL2 AMIs on 26 November 2025.
  • Kubernetes 1.32 is the last EKS version with AL2 node images, so AL2 blocks upgrades to 1.33 and later.
  • nodeadm and NodeConfig replace bootstrap.sh; never run nodeadm init yourself.
  • IMDSv2 is required and the hop limit defaults to 1, so use Pod Identity or IRSA for pod credentials.
  • AL2023 runs cgroup v2; upgrade old JDKs and agents before migrating.
  • Use blue/green node groups, drain gradually, and delete AL2 groups from Terraform when done.

An EKS AL2 to AL2023 migration is mostly a translation exercise: user data to NodeConfig, node credentials to Pod Identity, and old runtimes to cgroup v2-aware ones. Do those three things first, and the node swap itself becomes a routine blue/green rollout.

Editorial note: Migration behaviour follows AWS’s Upgrade from Amazon Linux 2 to Amazon Linux 2023 guide and the EKS AL2 AMI deprecation FAQ. The Amazon Linux 2 end-of-support date comes from the Amazon Linux 2 FAQ. Example endpoints, IDs and names are placeholders. Test on a non-production cluster first.

1 thought on “EKS AL2 to AL2023 Migration: nodeadm, User Data and Zero-Downtime Node Groups (2026)”

Leave a Comment