DEV Community

Cover image for Rancher 101 - Upgrading Kubernetes

Rancher 101 - Upgrading Kubernetes

Muhammad Abdur Rofi
Tech Geek 🤓
・2 min read

Upgrading Kubernetes

Kubernetes and companies that provide support for Kubernetes traditionally honor the three most recent minor releases. So if 1.18 is the current stable release, software will be officially supported for 1.16 and 1.17 as well. When 1.19 comes out, 1.16 will fall off the bottom of the stack.

This means that you will need to upgrade Kubernetes often over the life of your cluster.

You do this by first upgrading RKE on your host system. Each version of RKE has a specific list of supported Kubernetes versions, which you can find by running rke config --list-versions --all.

Make a one-time snapshot of etcd on the cluster. This is always a good practice.

When the snapshot is complete, and you know what version you’re upgrading to, edit cluster.yml and set that version in the kubernetes_version key.

Run rke up, and a short while later your cluster will be upgraded to the new version.

Use rke up to Upgrade a Single Node Cluster

  1. Use rke config to list the versions of Kubernetes supported by this version of rke.
  2. In Lab 2 you should have a selected one that is not the most recent. Now, you’ll upgrade the cluster to the latest version.
  3. Modify your cluster configuration file, using the new Kubernetes version
  4. Use rke up to deploy the cluster to the single node.

alt text

  1. RKE will have created several files. Keep these in a safe place.

Testing That It Works

  1. You can now use the kubeconfig file with kubectl to test access to the cluster.

References :

Discussion (0)