upgarding an EKS cluster .

jaffar shaik
4 min readJun 19, 2024

--

Eks cluster upgradation :

An Amazon EKS cluster consists of two primary components:

  • The Amazon EKS control plane
  • Amazon EKS nodes that are registered with the control plane

The Amazon EKS control plane consists of control plane nodes that run the Kubernetes software, such as etcd and the Kubernetes API server. The control plane runs in an account managed by AWS, and the Kubernetes API is exposed via the Amazon EKS endpoint associated with your cluster.

1. Control planes will be automatically upgraded .

2. Managed not we need to update them.

The upgrading process :

Look for the APIS versions are supported by the next version . we might get errors like the api version not supporting .

How to install Kubent :
the steps to configure kubent are found in below github Repo .

GitHub — doitintl/kube-no-trouble: Easily check your clusters for use of deprecated APIs

Kubent scans the cluster for depreciated API versions.

We also need A plugin for Kubernetes command-line tool kubectl, which allows you to convert manifests between different API versions. This can be particularly helpful to migrate manifests to a non-deprecated api version with newer Kubernetes release and the plugin is KUbectl convert plugin.

Instructions for installing kubectl convert plugin can be seen in below link

Install and Set Up kubectl on Linux | Kubernetes

Kubent scans the cluster for depreciated API versions.

We also need A plugin for Kubernetes command-line tool kubectl, which allows you to convert manifests between different API versions. This can be particularly helpful to migrate manifests to a non-deprecated api version with newer Kubernetes release and the plugin is KUbectl convert plugin.

Instructions for installing kubectl convert plugin can be seen in below link

Install and Set Up kubectl on Linux | Kubernetes

Figure : kubent

Lets run the command on a specific version version 1.23 of kubernetes in order to find the deprecated versions of APIS.

Figure : Kubent scanning for depreciated APIS for 1.23 version

Lets see from below file V1beta version has depreciated in Kubernetes version 1.22 .

Figure:k8s 1.22 beta version Depreciated .

Lets run the Kubectl convert plugin to avoid the above depreciated version .

We can see in below the version of API has changes to a new Api version V1.

Figure : Depreciated Beta version changed to V1 in 1.23 .

Lets run the cmd to upgrade the cluster from 1.22 to 1.23 version

Figure: Upgrading cluster from 1.22 to 1.23 version

After a few minutes we can see the cluster is upgraded but it may be not in stable state because the worker nodes also need to be updated .

While upgrading the cluster AWS fallowed two things

// “Cordon the node means no new pod will be scheduled on the node “ //

// “Drain the node means new pods will be migrated to new nodes from the old ones .”

Figure : control plane upgarded to 1.23

The cluster is running on 1.23 but the worker nodes are running in version 1.22 as shown below

Figure: Nodes still in Version 1.22

Lets upgrade the worker nodes .

Figure:Upgrading worker nodes to 1.23 version

Initially we had 2 nodes now its spinning 2 new nodes as shown below with a upgraded version.

Figure: EKS adding new nodes .
Figure: EKS adding new nodes .

Now the cluster and nodes are upgraded to 1.23 version .

--

--

jaffar shaik
jaffar shaik

Written by jaffar shaik

Am DevOps Engineer and SRE based in india.

No responses yet