Kubernetes upgrade – kubeadm

kubeadm is still in beta, but if you already deployed a Kubernetes cluster on some environment using it and now want to upgrade, you can do that manually. In some of previous posts, I wrote about Kubernetes deployment with kubeadm and it is available here https://crondev.com/kubernetes-installation-kubeadm. Currently kubeadm does not have support for cluster upgrade. This is a proposal I found, so it should be available later https://github.com/kubernetes/kubeadm/issues/14.

Check for updates

Find the latest version here https://github.com/kubernetes/kubernetes/tags, and check your running version with:

For this example, I did upgrade from v1.6.2 to v1.6.3.

Upgrade Kubelet

First, upgrade the system packages:

Repeat above step on each agent.

Upgrade Kubernetes

Upgrade the following components:

  • kube-apiserver
  • kube-scheduler
  • kube-controller-manager

Replace image version in all files:

Wait until containers are pulled from remote and replaced:

Upgrade kube-proxy

Next, we need to upgrade kube-proxy. Since this is a DaemonSet it doesn’t support rolling upgrades, so you will need to remove each kube-proxy container manually. They will be automatically replaced with a new version:

Upgrade kube-dns

Check for the latest available image with:

Edit image version, 3 images in this case. Deployment supports rolling upgrades, so containers will be upgraded automatically after edit:

And that’s it. You are running a new Kubernetes version.

Please share and leave a comment if something is not clear enough or you need some help.

Follow me

Alen Komljen

Building and automating infrastructure with Docker, Kubernetes, kops, Helm, Rancher, Terraform, Ansible, SaltStack, Jenkins, AWS, GKE and many others.
Follow me

Latest posts by Alen Komljen (see all)

Alen KomljenKubernetes upgrade – kubeadm