Upgrade EKS from kubernetes 1.19 to 1.20

I. Upgrade Control plane

i am using this terraform module following GitOps practices, so for me it’s about, replacing 2 attributes :

  • version: 14.0.0 -> 17.1.0 ( version of the terraform module)
  • cluster_versuin: 1.19 -> 1.20

Then, pipeline will do the remaining. I mean: terraform apply -auto-approve

If you are not using Terraform, you still have 3 methods to upgrade the control plane:

II. Upgrade Coredns

check compatibility matrix from here

Then upgrade. For me, it was:

kubectl set image --namespace kube-system deployment.apps/coredns coredns=602401143452.dkr.ecr.ap-southeast-1.amazonaws.com/eks/coredns:v1.8.3-eksbuild.1

III. Upgrade kube-proxy

check compatibility matrix from here

Then upgrade. For me, it was:

kubectl set image daemonset.apps/kube-proxy \-n kube-system \kube-proxy=602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/kube-proxy:v1.20.4-eksbuild.2

IV. Cluster Autoscaler

You might need to upgrade it

V. Rolling update nodes

install eks-workers-rolling-update :

# download it
curl -O https://gist.githubusercontent.com/abdennour/cb7cf2927740a5bd9ecdb51f5a96af0f/raw/ab6a2407a9f21b5cdd75838cf887a7bf13864c80/eks-workers-rolling-update.sh
# make sure that aws CLI and kubectl are installed

configure

export AWS_PROFILE=... AWS_REGION=....
export KUBECONFIG=.........

use it like a BOSS

bash eks-workers-rolling-update.sh

Go sleep 😴 now! let the script above complete the job

--

--

--

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

Love podcasts or audiobooks? Learn on the go with our new app.

The GSoC selection experience

What Is Magento? Everything You Need To Know

What Is Magento? Everything You Need To Know is image title

[Changelog] Honā Updates 18.08.21

Flexbox Container Width Broken In Direction Column — Why And How To solve

Mobile Pattern #4: Choose your abstraction precisely

Why Your Developers Should Meet With The Customer

Python for Begineers!!!!!:)

Introducing the New Remote Control for Your Presentations

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdennour Toumi

Abdennour Toumi

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

More from Medium

Removing Rancher 2.6.x Resources From Kubernetes Cluster

How to Design and Provision a Production-Ready EKS Cluster

Resizing an EKS EBS volume safely in Kubernetes with blue-green

Terraform for Existing kOps Managed K8s Clusters