Skip to content

How do I upgrade my Amazon EKS cluster and add-ons?

5 minute read
0

I want to follow best practices to upgrade my Amazon Elastic Kubernetes Service (EKS) cluster and add-ons.

Short description

Before you upgrade your cluster, verify compatibility with the new Kubernetes version. Also, you might need to update the storage drivers and add-ons to work with newer versions.

After you upgrade a Kubernetes version on your Amazon EKS cluster, you can't downgrade to a previous version. Before you upgrade the Kubernetes version, see Understand the Kubernetes version lifecycle on EKS. Confirm that your security group rules allow the required cluster communication for the subnets that you specified when you created your cluster.

Note:

  • A node's kubelet version can't be later than a Kubernetes version.
  • When you update your control plane, node groups don't automatically upgrade.
  • The node kubelet version can't be more than two minor versions earlier than a Kubernetes version. For example, for Kubernetes version is 1.33, the supported kubelet versions are 1.33, 1.32, and 1.31.

A minor version receives standard support in Amazon EKS for 14 months after release. Then, the version moves to extended support for 12 months.

You can use extended support to maintain a specific Kubernetes version for longer, with additional costs for each cluster hour. If you don't upgrade your cluster before the extended support period ends, then AWS automatically upgrades your cluster to the earliest currently supported version.

Extended support is activated by default. To deactivate extended support, see Prevent increased cluster costs by disabling EKS extended support. For release and support dates, see Amazon EKS Kubernetes release calendar.

Resolution

Update the Amazon EKS cluster version

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

First, check the current Kubernetes version of your cluster control plane and nodes and you current eksctl version.

Run the following command to check the Kubernetes version of your cluster control plane:

kubectl version

Example output:

Client Version: v1.33.2
Kustomize Version: v5.6.0
Server Version: v1.32.5-eks-5d4a308

Run the following command to get the Kubernetes version of your nodes:

kubectl get nodes

Example output:

NAME                            STATUS   ROLES    AGE    VERSION
ip-10-42-177-172.ec2.internal   Ready    <none>   132m   v1.32.3-eks-473151a 
ip-10-42-177-39.ec2.internal    Ready    <none>   142m   v1.32.3-eks-473151a

Run the following command to check your eksctl version:

eksctl version

Note: You must use eksctl version 0.210.0 or later. The upgrade takes several minutes to complete.

Then, use either eksctl, the Amazon EKS console, or the AWS CLI to update your cluster.

Update the node group version

To update a managed node group, see Update a managed node group for your cluster. To update your self-managed node group, you must migrate applications to a new node group.

Update Amazon EKS add-ons

Amazon EKS doesn't automatically upgrade add-ons during a control plane upgrade. Check the compatible versions for your add-ons, and then update them. You can upgrade only one minor version at a time.

To verify whether the add-on version is compatible for the latest version of Kubernetes, run the following command:

eksctl utils describe-addon-versions —kubernetes-version 1.33 —name name-of-addon | grep AddonVersion

Note: Replace name-of-addon with the name of your add-on and 1.33 with the latest version of Kubernetes.

Verify that your current version shows in the output.

Example output:

"AddonVersions": [
                    "AddonVersion": "v1.12.1-eksbuild.2",
                    "AddonVersion": "v1.11.4-eksbuild.14",
                    "AddonVersion": "v1.11.4-eksbuild.10",
                    "AddonVersion": "v1.11.4-eksbuild.2",
                    "AddonVersion": "v1.11.3-eksbuild.3",
                    "AddonVersion": "v1.11.3-eksbuild.2",

You might need to update the following Amazon EKS add-ons:

For more information, see AWS add-ons.

Amazon VPC CNI plugin

Check compatible Amazon VPC CNI versions for your cluster.

Then, choose one of the following options to update the add-on:

kube-proxy

Check compatible kube-proxy versions for your cluster.

Then, choose one of the following options to update the add-on:

CoreDNS

Check compatible CoreDNS versions for your cluster.

Then, choose one of the following options to update the add-on:

Amazon EBS and Amazon EFS CSI drivers

To update an Amazon EBS CSI driver or Amazon EFS CSI driver, see Update an Amazon EKS add-on.

Update AWS Load Balancer Controller

For Kubernetes version compatibility with AWS Load Balancer Controller, see Supported Kubernetes versions on the GitHub website. AWS Load Balancer Controller version 2.5.0 or later requires Kubernetes version 1.22 or later. For more information, see the aws-load-balancer-controller releases on the GitHub website. To install AWS Load Balancer Controller, see Install the controller.

AWS OFFICIALUpdated 14 days ago