Unable to update kubeadm version using CLI

https://beta.kodekloud.com/user/courses/udemy-labs-certified-kubernetes-administrator-with-practice-tests/module/6ae63073-ea0a-48ca-99f2-53ca5e3529a3/lesson/4cc6aba0-6795-47b3-a63c-20b60ce442ac

I am running below cmd and getting this error

apt install kubeadm=1.29.0-00
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Version ‘1.29.0-00’ for ‘kubeadm’ was not found

kubeadm was already there for older version

controlplane ~ ➜ kubeadm version
kubeadm version: &version.Info{Major:“1”, Minor:“28”, GitVersion:“v1.28.0”, GitCommit:“855e7c48de7388eb330da0f8d9d2394ee818fb8d”, GitTreeState:“clean”, BuildDate:“2023-08-15T10:20:15Z”, GoVersion:“go1.20.7”, Compiler:“gc”, Platform:“linux/amd64”}

hi @akshay-rathi

   Maybe you need to change the repo of k8s to version 1.29 first. Go to /etc/apt/sources.list.d/ kubernetes.list

  Then change the repo version. In the kubernetes.list file you will see a long string. after stable/:v1.28/deb/ / change the version to 1.29. So in the end, you just need to change the number and exit the text editor of your choice.

  After that perform sudo apt update. and then proceed to install kubeadm v1.29. In CKA course of kodekloud (Not udemy, I never try that) you need to install like sudo apt install kubeadm=1.29.0-1.1 I’m not sure why does need the -1.1 in the end, but this is how the lab container works. Try with that also.

have a nice day.

One more step after this…

apt-cache madison kubeadm

then that will tell you what 1.29 versions are available, and the release number (e.g. 1-1), so then you will know exactly what to give to apt install