-1

I'm trying to upgrade our Kubernetes kubeadm cluster from v-1.19.4 to v-1.19.13 on Ubuntu system with the below steps, i could able to upgrade my master host, however still worker hosts remain with same older version.

On Master:-
apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm=1.19.13-00 && \
apt-mark hold kubeadm

apt-get update && \
apt-get install -y --allow-change-held-packages kubeadm=1.19.13-00

kubeadm upgrade plan

kubeadm upgrade apply v1.19.13

kubeadm upgrade node

kubectl drain worker-1 --ignore-daemonsets
kubectl drain worker-2 --ignore-daemonsets

apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet=1.19.13-00 kubectl=1.19.13-00 && \
apt-mark hold kubelet kubectl

apt-get update && \
apt-get install -y --allow-change-held-packages kubelet=1.19.13-00 kubectl=1.19.13-00 

systemctl daemon-reload
systemctl restart kubelet

kubectl uncordon worker-1
kubectl uncordon worker-2

On Worker Host:-

apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm=1.19.13-00 && \
apt-mark hold kubeadm

apt-get update && \
apt-get install -y --allow-change-held-packages kubeadm=1.19.13-00

kubeadm upgrade node

On Master Host:-
kubectl drain worker-1 --ignore-daemonsets
kubectl drain worker-2 --ignore-daemonsets

On Worker Node:-
apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet=1.19.13-00 kubectl=1.19.13-00 && \
apt-mark hold kubelet kubectl

apt-get update && \
apt-get install -y --allow-change-held-packages kubelet=1.19.13-00 kubectl=1.19.13-00

systemctl daemon-reload
systemctl restart kubelet

On Master Host:-
kubectl uncordon worker-1
kubectl uncordon worker-2

~# kubectl get nodes
NAME      STATUS   ROLES      AGE   VERSION
master    Ready    master     45h   v1.19.13
worker1   Ready    worker-1   27h   v1.19.4
worker2   Ready    worker-2   27h   v1.19.4

Here still my worker nodes have old v1.19.4. Is there any additional steps that i need to perform on worker hosts? Please suggest. Thanks.

user4948798
  • 1,924
  • 4
  • 43
  • 89

1 Answers1

1

Have restarted all the hosts and tried the above given steps, it has upgraded successfully.

user4948798
  • 1,924
  • 4
  • 43
  • 89