Upgrading the EKS Cluster, Node Groups, and Add-Ons from Version 1.28 to 1.29

KUNALKUNAL
4 min read

Here are the steps in point form:

  1. Upgrade EKS Cluster:

    • Update the EKS cluster to the latest Kubernetes version, ensuring workload compatibility.
  2. Upgrade Node Groups:

    • Sequentially upgrade each node group.
  3. Upgrade Add-ons:

    • Update all installed add-ons to align with the new cluster and node versions, ensuring stability and optimization.
  • Current Version: 1.28

List Nodes

To view the status of all nodes in your EKS cluster, use the following command:

kubectl get nodes

List Clusters

To retrieve a list of all EKS clusters in your AWS account, use the following command:

aws eks list-clusters --query "clusters[*]" --output text

Check Current Cluster Version

To check the current Kubernetes version of your EKS cluster, use the following command:

aws eks describe-cluster --name demo-eks-cluster --query "cluster.version" --output text

Upgrade the Cluster Version

To upgrade your EKS cluster to version 1.29, use the following command:

aws eks update-cluster-version --name demo-eks-cluster --kubernetes-version 1.29

Monitor the Upgrade

To monitor the status of the upgrade process for your EKS cluster, use the following command:

aws eks describe-cluster --name demo-eks-cluster --query "cluster.status" --output text

Expected Output

You should see the upgraded version:

Node Groups upgrading using AWS console & CLI

Upgrading Node Groups Using AWS Console

The node group is running version 1.28. To update, click the "Update Now" button located at the top right. After some time, the node group will be upgraded.

You can verify this upgrade in the screenshot, where it indicates that the node group has been upgraded.

Upgrading Node Groups Using CLI

First, list all node groups in your cluster to identify the one you want to upgrade. Use the following command:

aws eks list-nodegroups --cluster-name demo-eks-cluster

Ensure that your node group is running the desired version. For example, if it is running version 1.28, verify this using the CLI:

aws eks describe-nodegroup --cluster-name demo-eks-cluster --nodegroup-name demo-nodegroup

Upgrade each node group one by one to avoid disruptions. Use the following command.

aws eks update-nodegroup-version --cluster-name demo-eks-cluster --nodegroup-name demo-nodegroup --no-force

Repeat for Each Node Group

Please refer to the provided screenshot, which shows that the node group is currently in an updating state.

Additionally, you can verify the status by running the following command:

aws eks describe-nodegroup --cluster-name demo-eks-cluster --nodegroup-name demo-nodegroup --query "nodegroup.status" --output text

Before starting the upgrade process, the Auto Scaling Group (ASG) configuration was set to a

  • Max: 1

  • Min: 1

  • Desired: 1

During the upgrade process, the ASG automatically adjusted its settings to accommodate the additional resources needed, resulting in a new configuration with

  • Max: 6

  • Min: 6

  • Desired: 6

After the upgrade was completed successfully, the ASG configuration reverted to its original settings to ensure optimal resource usage and cost efficiency.

Please refer to the attached screenshot, which indicates that the node group has been successfully upgraded.

ADD-ONS

Additionally, the upgrade process for the add-ons will be conducted. The steps for this process are outlined below:

To retrieve the list of add-ons associated with the specified EKS cluster, use the following command:

eksctl get addon --cluster demo-eks-cluster --region us-east-1

CoreDNS

For details on compatible versions of the CoreDNS add-on, please refer to the following link:
https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html

To upgrade the CoreDNS add-on in your EKS cluster to a specific version, use the following command:

aws eks update-addon \
    --cluster-name demo-eks-cluster \
    --addon-name coredns \
    --addon-version v1.11.3-eksbuild.1 \
    --region us-east-1

To check the status of the CoreDNS add-on and determine whether it has been upgraded to a compatible version, use the following command:

aws eks describe-addon --cluster-name demo-eks-cluster --addon-name coredns --region us-east-1

Please refer to the provided screenshot for further confirmation of the upgrade status.

Kube-proxy:

For details on compatible versions of Kube-proxy, please refer to the following link:

https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html#managing-kube-proxy-images

To upgrade the Kube-proxy add-on in your EKS cluster to a specific version, use the following command:

aws eks update-addon \
    --cluster-name demo-eks-cluster \
    --addon-name kube-proxy \
    --addon-version v1.29.7-eksbuild.9 \
    --region us-east-1

To check the status of the Kube-proxy add-on and determine whether it has been successfully upgraded, use the following command:

aws eks describe-addon --cluster-name demo-eks-cluster --addon-name kube-proxy --region us-east-1

VPC CNI

For details on compatible versions of the VPC CNI plugin, please refer to the following link:
https://docs.aws.amazon.com/eks/latest/userguide/managing-vpc-cni.html

To upgrade the VPC CNI add-on in your EKS cluster to a specific version, use the following command:

aws eks update-addon \
    --cluster-name demo-eks-cluster \
    --addon-name vpc-cni \
    --addon-version v1.18.5-eksbuild.1 \
    --region us-east-1

Thank you for reading! ❤️

0
Subscribe to my newsletter

Read articles from KUNAL directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

KUNAL
KUNAL