Skip to main content

Upgrading the Kubernetes Version

To upgrade the Kubernetes version of your EKS cluster, update the kubernetes_version variable in your module definition (renamed from cluster_version in v21.x):
Then run:
EKS upgrades are performed one minor version at a time. Attempting to skip a minor version will result in an API error. For example, to go from 1.29 to 1.31, you must first upgrade to 1.30.

Upgrading the Module Version

1

Review the upgrade guide

Read the breaking changes section below for the target major version before making any changes.
2

Update the version constraint

Change the version argument in your module source block to the new target.
3

Reinitialise Terraform

4

Apply incremental state moves (if required)

Some major versions require Terraform state moves before applying. These are documented in the per-version sections below.
5

Plan and apply


Breaking Changes by Major Version

Upgrade from v16.x to v17.x

This release removes the use of random_pet resources in Managed Node Groups (MNG). Those resources were used to force MNG re-creation on changes but caused many issues. Without intervention, upgrading will cause your MNGs to be replaced.

Migration Steps

1

Apply v16.2.0 first

Before upgrading, ensure your configuration is fully applied at v16.2.0.
2

Retrieve existing node group names

3

Pin existing names in your configuration

Set the current node group name explicitly to prevent re-creation:
4

Plan and verify

Run terraform plan. You should see only the random_pet resource scheduled for destruction — no node group replacements:
5

Apply

After the first apply, remove the hardcoded name argument and let the module use node_group_name_prefix to generate names automatically. This avoids collisions during node group re-creation since lifecycle { create_before_destroy = true } is set.