Upgrading Amazon EKS Clusters in 2023 | Rafay
Upgrading Amazon EKS Clusters in 2023
October 9, 2021
Introduction
Kubernetes is a rapidly evolving open-source project with periodic releases. Organizations embracing Kubernetes must adopt the practice of regular upgrades, as Kubernetes doesn’t follow the Long Term Support (LTS) concept. They have a versioning and releasing process that follows a quarterly release cycle, with a cadence ranging between 70 and 130 days. The Kubernetes upgrade process is not just limited to the deployed components; you also need to keep a check on Kubernetes API versioning.
How to Update Amazon EKS Clusters Using the AWS Management Console:
The Amazon EKS upgrade process involves launching new API server nodes with the updated Kubernetes version to replace the existing ones. It is an incremental approach that does not allow jumping to the latest version directly.
Prerequisites
Validate the version of your Kubernetes cluster and worker nodes. The Kubernetes minor version of worker nodes must match the control plane current version.
To get the Kubernetes Control Plane:
$ kubectl version --short
Determine the worker nodes version:
$ kubectl get nodes
How to Update the Amazon EKS Control Plane
Amazon EKS allows administrators to upgrade the control plane from the AWS management console. The AWS console shows an information banner with the Update Now button. Click it to start the upgrade process.
You can also use CLI commands to perform an Amazon EKS upgrade:
Initiate the upgrade:
$ docker run --rm -it -v ~/.aws:/root/.aws -v ~/.kube:/root/.kube amazon/aws-cli eks --region us-east-2 update-cluster-version --name dev --kubernetes-version 1.19
Check the task details after the upgrade:
$ docker run --rm -it -v ~/.aws:/root/.aws -v ~/.kube:/root/.kube amazon/aws-cli eks --region us-east-2 describe-update --name dev --update-id <TASK_ID>
How to Upgrade Amazon EKS Nodes
Scale-down Kubernetes AutoScaler
Kubernetes has an Autoscaler component that ensures every pod has a place to run. Scale down the AutoScaler to prevent operations from interfering with node upgrades:
$ kubectl get deployment cluster-autoscaler -n kube-system
Update Nodes
Amazon EKS worker nodes should provide an upgrade message if it determines a possibility of an auto-upgrade. Click the update-now button to perform the upgrade.
Update EKS Addons nodes
EKS provides managed add-ons for Kube-proxy, CNI VPC, and CoreDNS. The following table lists EKS recommended add-on versions:
| Kubernetes version | 1.20 | 1.19 | 1.18 | 1.17 |
|---|---|---|---|---|
| kube-proxy | 1.20.4-eksbuild.2 | 1.19.6-eksbuild.2 | 1.18.8-eksbuild.1 | 1.17.9-eksbuild.1 |
| CoreDNS | 1.8.3 | 1.8.0 | 1.7.0 | 1.6.6 |
| VPC CNI | 1.8. x | 1.8. x | 1.8. x | 1.8. x |
Streamlining the Amazon EKS Upgrade Process with Rafay
Rafay provides an automated, standardized, repeatable process for Amazon EKS upgrades. The console allows you to select components for the upgrade and performs pre and post-upgrade checks to ensure cluster correctness and stability.