Kubernetes* Best Practices

Use swupd to update clusters

This tutorial shows you how to manage your Kubernetes cluster while using swupd to update Clear Linux* OS.

In our tutorial Kubernetes*, we explain how to set up a Kubernetes cluster on Clear Linux OS using kubeadm. Kubeadm documentation often builds on the assumption that the distribution uses a traditional package manager (e.g., RPM/DEB).

In contrast, Clear Linux OS uses swupd to update the OS, which in this case updates all of the kubernetes node and client binaries simultaneously, as part of the cloud-native-basic bundle (e.g., kubectl, kubeadm, kubelet). Running sudo swupd update requires special care to ensure the OS incorporates the latest Kubernetes upgrades.

This document describes best practices to manage cluster upgrades with kubeadm on a Clear Linux OS-based cluster.


Assure that you:

  • Completed Kubernetes*
  • Installed the bundle cloud-native-basic


Other Linux* distros shown in Kubernetes upgrade documentation reflect apt-get update, apt-mark hold kubeadm, and similar commands; however, such commands are not valid on Clear Linux OS.

Update the control plane

  1. Read kubernetes documentation before you begin.

  2. On your master node, run the command:

    sudo swupd update


    If the minor version of Kubernetes changes, Clear Linux OS shows a message-of-the-day, or motd. When the motd appears, you must postpone a kubelet restart on master and nodes until the control plane is properly updated. swupd update does not restart services automatically unless explicitly configured to do so.

  3. Now follow these instructions in kubernetes documentation.

Update worker nodes

  1. On each worker node, run the command:

    sudo swupd update
  2. Now follow these instructions in kubernetes documentation: