Maintenance of ARM k8s cluster

Maintenance of ARM k8s cluster
Photo by Clint Patterson / Unsplash

k8s

upgrade from 1.25.0 to 1.27.6(latest of 1.27)

To 1.26.9

apt-mark unhold kubeadm
apt-get install -y kubeadm=1.26.9-00
apt-mark hold kubeadm

for master:sudo kubeadm upgrade apply v1.26.9

for worker:sudo kubeadm upgrade node

apt-mark unhold kubelet kubectl
apt-get install -y kubelet=1.26.9-00 kubectl=1.26.9-00
apt-mark hold kubelet kubectl

sudo systemctl daemon-reload
sudo systemctl restart kubelet

I don't know why the containerd.io is not installed on my control plane node. After I reboot the control plane node, the api is down, the cluster almost down, so I find this on stackoverflow, since I have almost same error message: https://serverfault.com/questions/1118051/failed-to-run-kubelet-validate-service-connection-cri-v1-runtime-api-is-not-im

After installed containerd.io, everything is fine.

To 1.27.6

almost same as previous part.

CNI

During the upgrade, the manual mentioned the CNI could be upgrade manually, I use Flannel, and I check there are some versions can be upgrade, I use v0.20.2 and the latest is 0.22.3. It works fine with k8s 1.27.6, so I decide do not update it sinece I just need very simple usage of CNI. Flannel is an overlay network provider that can be used with Kubernetes. I have no idea why I choose it, but I know I have to choose one, so I use it.

Ghost blog upgrade

From 5.40.2-alpine to 5.66.0-alpine, just modify the k8s deployment yaml and apply it.