DEV Community

Cheedge Lee
Cheedge Lee

Posted on • Originally published at notes-renovation.hashnode.dev

CKS Notes - work node update

Here just a quick present of basic workflow of how to upgrade on the work node.More details can refer to the official doc, upgrading Linux work node.

Notice: The official doc shows is the completed procedural which we will stop the jobs, and drain the node(s) then continue the upgrade, but here we do the upgrade one work node without disturbing the jobs.

1. check the nodes we will upgrade

controlplane:~$ k get no
NAME           STATUS   ROLES           AGE   VERSION
controlplane   Ready    control-plane   10d   v1.34.2
node01         Ready    <none>          10d   v1.34.1
Enter fullscreen mode Exit fullscreen mode

2. ssh to the node and check the version

controlplane:~$ ssh node01
node01:~$ apt-cache madison kubeadm
   kubeadm | 1.34.2-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.1-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.0-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
Enter fullscreen mode Exit fullscreen mode

3. ssh to work node, do the upgrade

node01:~$ apt install kubeadm=1.34.2-1.1
node01:~$ kubeadm upgrade node
node01:~$ apt install kubelet=1.34.2-1.1 kubectl=1.34.2-1.1
node01:~$ systemctl restart kubelet
Enter fullscreen mode Exit fullscreen mode

4. back to controlplane and check the result

node01:~$ ssh controlplane
controlplane:~$ k get node
NAME           STATUS   ROLES           AGE   VERSION
controlplane   Ready    control-plane   10d   v1.34.2
node01         Ready    <none>          10d   v1.34.2
Enter fullscreen mode Exit fullscreen mode

Cluster upgrade

If need to upgrade the controlplane node, see the article here, or the official doc about upgrade kubeadm.

Top comments (0)