k8s
k8s
kubeadm cluster upgrades
on the first control plane node
First, we want to bump kubeadm itself.
Bump the repo to the target minor version (1.32 to 1.33, for example)
sudo vim /etc/apt/sources.list.d/kubernetes.listPick a target kubeadm version (most recent is usually fine; if there are point releases to bump you might have to do that first - ie 1.32.4 to 1.32.12, then to 1.33.X)
sudo apt update
sudo apt-cache madison kubeadmInstall the kubeadm update
sudo apt install kubeadm='1.33.12-1.1'Now we can start updating cluster components. Plan the upgrade:
sudo kubeadm upgrade planThat’ll spit out a final version to aim for. Run that update:
sudo kubeadm upgrade apply v1.33.12Let that spin for about 5 minutes. Now we can do kubelet/kubectl.
I’m lazy, I just update everything here
sudo apt update
sudo apt dist-upgradeI reboot the node at this point as well.
second control plane node (and third)
For all other control plane nodes, the steps look mostly the same. The exception is we can skip kubeadm plan, and we’ll use the upgrade node command instead of upgrade apply
Bump the repo to the target minor version (1.32 to 1.33, for example)
sudo vim /etc/apt/sources.list.d/kubernetes.listPick a target kubeadm version (most recent is usually fine; if there are point releases to bump you might have to do that first - ie 1.32.4 to 1.32.12, then to 1.33.X)
sudo apt update
sudo apt-cache madison kubeadmInstall the kubeadm update
sudo apt install kubeadm='1.33.12-1.1'Now we update the cluster components:
sudo kubeadm upgrade nodeLet that spin for about 5 minutes. Now we can do kubelet/kubectl.
I’m lazy, I just update everything here
sudo apt update
sudo apt dist-upgradeI reboot the node at this point as well.
workers
Workers just need kubelet upgrades. So bump the repo, run the update, and (if lazy) reboot
sudo vim /etc/apt/sources.list.d/kubernetes.list
sudo apt update
sudo apt dist-upgrade
sudo reboot now