Things to do before upgrading Kubernetes cluster

10/23/2019

I have production stage hosted in Google Kubernetes Engine with Kubernetes version 1.12.9-gke.15.

My team is planning to upgrade it to Kubernetes version 1.13.11-gke.5.

A capture of list of Kubernetes version

picture

I have read some articles to upgrade Kubernetes. However, they use kubeadm not GKE.

How to update api versions list in Kubernetes here's a example that use GKE.

If you guys have experience in upgrading kubernetes cluster in GKE or even kubeadm. Please share what should i do before upgrading the version ?

Should i upgrade the version to 1.13.7-gke.24 and then to 1.13.9-gke.3 and so on ?

-- Nicky Puff
google-kubernetes-engine
kubernetes

2 Answers

10/23/2019

GCP Kubernetes is upgraded manually and generally does not require you to do much. But if you are you looking for manual upgrade options maybe this will help.

https://cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster

A point worth mentioning is too, make sure you have persistence volumes for services that require to do so viz. like DB, etc And for these, you will have to back them up manually.

-- damitj07
Source: StackOverflow

10/23/2019

You first should check if you are not using any depreciated features. For example check the Changelogs for version 1.12 and 1.13 to make sure you won't loose any functionality after the upgrade.

You will have to remember that if you have just one master node you will loose access to if for few minutes while control plane is being updated. After master node is set then worker nodes will follow.

There is a great post about Kubernetes best practices: upgrading your clusters with zero downtime, which talks about location for nodes and a beta option being Regional

When creating your cluster, be sure to select the “regional” option:

And that’s it! Kubernetes Engine automatically creates your nodes and masters in three zones, with the masters behind a load-balanced IP address, so the Kubernetes API will continue to work during an upgrade.

And they explain how does Rolling update works and how to do them.

Also you might consider familiarizing yourself with documentation for Cluster upgrades, as it discusses how automatic and manual upgrades work on GKE.

As you can see from your current version 1.12.9-gke.15 you cannot upgrade to 1.14.6-gke.1. You will need to upgrade to 1.13.11-gke.5 and once this is done you will be able to upgrade to latest GKE version.

-- Crou
Source: StackOverflow