1. Determine which version to upgrade to
apt update
apt-cache madison kubeadm
# find the latest 1.24 version in the list
# it should look like 1.24.x-00, where x is the latest patch
  1. Upgrading control plane nodes
# replace x in 1.24.x-00 with the latest patch version
apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm=1.24.x-00 && \
apt-mark hold kubeadm
 
kubeadm version
 
kubeadm upgrade plan
 
# replace x with the patch version you picked for this upgrade
sudo kubeadm upgrade apply v1.24.x

# For the other control plane nodes
sudo kubeadm upgrade node
  1. Upgrade kubelet and kubectl
# replace x in 1.24.x-00 with the latest patch version
apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet=1.24.x-00 kubectl=1.24.x-00 && \
apt-mark hold kubelet kubectl

sudo systemctl daemon-reload
sudo systemctl restart kubelet
  1. Uncordon the node
# replace <node-to-drain> with the name of your node
kubectl uncordon <node-to-drain>
  1. Upgrade worker nodes
# replace x in 1.24.x-00 with the latest patch version
apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm=1.24.x-00 && \
apt-mark hold kubeadm

sudo kubeadm upgrade node

# replace <node-to-drain> with the name of your node you are draining
kubectl drain <node-to-drain> --ignore-daemonsets

# replace x in 1.24.x-00 with the latest patch version
apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet=1.24.x-00 kubectl=1.24.x-00 && \
apt-mark hold kubelet kubectl

sudo systemctl daemon-reload
sudo systemctl restart kubelet

# replace <node-to-drain> with the name of your node
kubectl uncordon <node-to-drain>

kubectl get nodes


출처

https://youtu.be/s75Wyu0z4Xo