In the upgrade lab, I ran the following: ``` root@controlplane:~# apt-get upgra . . .

Shanmuga Raj:
In the upgrade lab, I ran the following:

root@controlplane:~# apt-get upgrade -y kubectl=1.19.16-00 --allow-change-held-packages
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  <http://containerd.io|containerd.io> docker-ce docker-ce-cli kubelet
The following held packages will be changed:
  kubectl
The following packages will be upgraded:
  kubeadm kubectl
2 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 16.9 MB of archives.
After this operation, 6095 kB of additional disk space will be used.
Get:1 <https://packages.cloud.google.com/apt> kubernetes-xenial/main amd64 kubectl amd64 1.19.16-00 [8352 kB]
Get:2 <https://packages.cloud.google.com/apt> kubernetes-xenial/main amd64 kubeadm amd64 1.23.4-00 [8583 kB]
Fetched 16.9 MB in 1s (21.1 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 15148 files and directories currently installed.)
Preparing to unpack .../kubectl_1.19.16-00_amd64.deb ...
Unpacking kubectl (1.19.16-00) over (1.19.0-00) ...
Preparing to unpack .../kubeadm_1.23.4-00_amd64.deb ...
Unpacking kubeadm (1.23.4-00) over (1.19.16-00) ...
Setting up kubectl (1.19.16-00) ...
Setting up kubeadm (1.23.4-00) ...

now my cluster is running 1.19.6 on both master.worker, but the lab expects me to be on 1.20.0 running kubeadm upgrade plan is thorwing this error now,

root@controlplane:~# kubeadm upgrade plan
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration from the cluster...
[upgrade/config] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[upgrade/config] FATAL: this version of kubeadm only supports deploying clusters with the control plane version &gt;= 1.22.0. Current version: v1.19.16
To see the stack trace of this error execute with --v=5 or higher

seand:
hold up.

for the control plane, did you apt upgarde kubeadm before you were upgrading kubectl? all I see is that you are upgrading kubectl and then trying to run the kubeadm upgrade plan.

basically you upgarde kubeadm. then check the upgrade plan to make sure all is well. then apply the version you are upgrading to. then cordon the node…then upgrade kubectl and kubelet…then uncordon the node…

Shanmuga Raj:
yep, kuebadm suggested available version 1.19.16 . The lab was on 1.19.0 to begin with. I first updated kubeadm to 1.19.16 and did teh other steps. 1.19.16 upgrade went just fine.

Shanmuga Raj:
but I cant do any more updates as teh kubeadm got updated with kubectl

Shanmuga Raj:
kubectl - 1.19.16
kubeadm - 1.23.0

Shanmuga Raj:
I am going to rest the lab to do again

seand:
100% reset the lab :slightly_smiling_face:

you can upgrade from 1.19 -> 1.20 without issue. Also keep in mind that your kubeadm and kubelet/kubectl need to be within a certain number of revision numbers or they won’t work with each other. 1.19 and 1.23 are too far apart.

Upgrade kubeadm to 1.20, plan, apply
drain the node
upgrade kubectl, kubelet
run kubelet version…you;ll see you are server/client 1.20
uncordon node

Shanmuga Raj:
kubeadm got updated to 1.23 when kubctl updated to 1.19.16, which si wierd, now kubeadm complains it cant work with anything less than 1.20… let me do the reset and see how it goes

Shanmuga Raj:
got it working now. So, I have up upgrade kubeadm=1.20.0 first, then override the apply with 1.20.0 as the kubeadm suggest 1.20.15 . This was tricky one :slightly_smiling_face:

seand:
funny, i was just typing out how to get this done in case you had issues…guess i didn’t need to.

yeah you have to override whatever upgrade apply suggests with the version you are asked to go to.

Shanmuga Raj:
:thumbsup:

seand:
i can tell you this…if you are able to get this part of the lightning lab done without issue and quickly, you will be fine on the CKA exam. KodeKloud did a great job with this scenario.

good luck :slightly_smiling_face: