Kubernetes versions take the format Major.Minor.Patch (1.27.8)
- Read the CHANGELOG file! Seriously
- Upgrade each control plane node fully before moving to the next
- Upgrade kubeadm
#Change the kubernetes version in /etc/apt/sources.list.d/kubernetes.list apt-mark unhold kubeadm apt-get update apt-get upgrade -y kubeadm apt-mark hold kubeadm
- Upgrade node with kubeadm
- On first control plan node upgrade only
kubeadm upgrade plan v1.28.10 kubeadm upgrade apply v1.28.10
- On other control plan nodes only
kubeadm upgrade node
- On first control plan node upgrade only
- Upgrade kubelet and kubectl
kubectl drain <node-to-drain> --ignore-daemonsets apt-mark unhold kubelet kubectl apt-get update apt-get upgrade -y kubelet kubectl apt-mark hold kubelet kubectl
- Restart kubelet service
systemctl daemon-reload systemctl restart kubelet
- Upgrade Containerd
apt-mark unhold containerd.io apt upgrade containerd.io apt-mark hold containerd.io
- Uncordon the node
kubectl uncordon <node-to-drain>
- Upgrade kubeadm
- Upgrade each worker node fully before moving to the next
- Upgrade kubeadm
#Change the kubernetes version in /etc/apt/sources.list.d/kubernetes.list apt-mark unhold kubeadm apt-get update apt-get upgrade -y kubeadm apt-mark hold kubeadm
- Upgrade node with kubeadm
kubeadm upgrade node
- Upgrade kubelet and kubectl
kubectl drain <node-to-drain> --ignore-daemonsets --delete-emptydir-data apt-mark unhold kubelet kubectl apt-get update apt-get upgrade -y kubelet kubectl apt-mark hold kubelet kubectl
- Restart kubelet service
systemctl daemon-reload systemctl restart kubelet
- Upgrade Containerd
apt-mark unhold containerd.io apt upgrade containerd.io apt-mark hold containerd.io
- Uncordon the node
kubectl uncordon <node-to-drain>
- Upgrade kubeadm