Upgrade an Existing EKS Cluster
About this task
Procedure
- On the search bar in the AWS console, type EKS and select Elastic Kubernetes Service as shown in the following figure:
- In the EKS section, you can see view the cluster eligible for upgrade. For example:
- Click the Update now button. This action will allow you to update to the next possible EKS version.
- Click Update and the status will change to updating, as shown in the following figure.
- Go to the Compute tab, and select the node group as shown in the following figure.
- Select the Default node group and click Launch template. The default node group configuration appears.
- Click Actions and select Modify template (create new version).
- In the Template version description, enter 2 as it will be the second version of the template, and also select the Auto Scaling guidance check box as shown in the following figure.
- While creating the new version, click the Browse more AMIs section.
- Click the fourth tab, Community AMI.
- Search the AMI of the latest version. For example, the following figure shows: amazon-eks-node-1.25-v20240117.
- Leave the defaults for all other options as it is. Click Create template version.
- After creating the template, set it as the default version by clicking on actions and selecting version 2 as default version, as shown in the following figure. Click Set as default version.
- Go back to the EKS page, and check if it is upgraded to the version you chose to upgrade. After it is done, you can then upgrade the node group with new template that you just created.
- To update the node group, go to Compute tab and select node group with name Default as shown in the following figure:
- In the node group configuration, you can see Change version in Launch template version as shown in the following figure:
- Click Change version and select the template you created in the previous steps and then click Update:
- After performing this step, notice that the status changes to Updating as shown in the following figure.
- Wait a few mintues to complete the upgrade. After it is done, check whether the cluster version and node group version is same or not.
-
Repeat steps 4-13 and create new template version for every upgrade and apply
it. The AMI names for every K8s version are as follows:
Kubernetes 1.25: amazon-eks-node-1.25-v20240117
Kubernetes 1.26: amazon-eks-node-1.26-v20240117
Kubernetes 1.27: amazon-eks-node-1.27-v20240117
Kubernetes 1.28: amazon-eks-node-1.28-v20240117
Kubernetes 1.29: amazon-eks-node-1.29-v20240117
- After complete, confirm both the EKS version and node group version is at latest.
- Finally, change the number of instances in auto scaling groups to 1 and wait for 3-4 mins until its in a running state and all pods running as well.