upgarding an EKS cluster .
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
Lets run the command on a specific version version 1.23 of kubernetes in order to find the deprecated versions of APIS.
Lets see from below file V1beta version has depreciated in Kubernetes version 1.22 .
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.
Lets run the cmd to upgrade the 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 .”
The cluster is running on 1.23 but the worker nodes are running in version 1.22 as shown below
Lets upgrade the worker nodes .
Initially we had 2 nodes now its spinning 2 new nodes as shown below with a upgraded version.
Now the cluster and nodes are upgraded to 1.23 version .