This is a cheat sheet created during the last upgrade of a CentOS-based Kubernetes cluster serving Developer’s Cloud Desktops to our customers. TLDR; style.
The commands are tested on CentOS 7. For Ubuntu, replace
sudo yum install -y kubeadm-1.25.4-00 --disableexcludes=kubernetes
by
sudo apt-mark unhold kubeadm;
sudo apt-get install -y kubeadm=1.25.4-00;
sudo apt-mark hold kubeadm
and similar for kubectl and kubelet.For Ubuntu, you also need to replace
sudo yum list --showduplicates kubeadm --disableexcludes=kubernetes
by
sudo apt-cache madison kubeadm
Please report in the feedback section below, if it does not work in your case.
References
- Upgrading kubeadm clusters
for CKA tests: the document can be found via kubernetes.io –> documentation –> search „upgrade“ –> follow the first hit Upgrade A Cluster | Kubernetes –> search on the page for kubeadm and follow the link Upgrading kubeadm clusters
Step 1: Create Backup
Recommended
Step 2: Upgrade to the latest Hotfix Version
This is an example of how to upgrade to v1.21.12 as the latest hotfix version of v1..21:
# upgrade DEV v1.21.3 to v1.21.12: sudo yum install -y kubeadm-1.21.12-0 --disableexcludes=kubernetes # on all machines (also on the worker nodes, because we need it for pre-downloading the images) sudo kubeadm upgrade plan # master sudo kubeadm config images pull # on all machines sudo kubeadm upgrade apply v1.21.12 # on master sudo kubectl get nodes # if the last command has failed, you might need to configure the correct kube config for root as follows: sudo mkdir -p /root/.kube sudo cp -i /etc/kubernetes/admin.conf /root/.kube/config # drain worker nodes: WORKER_NODE=node1 kubectl drain $WORKER_NODE --ignore-daemonsets --delete-emptydir-data sudo systemctl daemon-reload # on all machines sudo systemctl restart kubelet # on all machines # check kubectl get nodes # enable worker node scheduling: WORKER_NODE=node1 kubectl uncordon $WORKER_NODE
Step 3: Upgrade to the next higher main Version
# upgrade DEV v1.21.12 to v1.22.9: sudo yum install -y kubeadm-1.22.9-0 --disableexcludes=kubernetes # on all machines (also on the worker nodes, because we need it for pre-downloading the images) sudo kubeadm upgrade plan # master sudo kubeadm config images pull # on all machines sudo kubeadm upgrade apply v1.22.9 # on master # check kubectl get nodes # drain worker nodes: WORKER_NODE=node1 kubectl drain $WORKER_NODE --ignore-daemonsets --delete-emptydir-data sudo systemctl daemon-reload # on all machines sudo systemctl restart kubelet # on all machines # check kubectl get nodes sudo kubeadm certs check-expiration # on master # enable worker node scheduling: WORKER_NODE=node1 kubectl uncordon $WORKER_NODE # on master kubectl get nodes
of course like your website but you have to check the spelling on several of your posts A number of them are rife with spelling issues and I in finding it very troublesome to inform the reality on the other hand I will certainly come back again
I loved as much as youll receive carried out right here The sketch is tasteful your authored material stylish nonetheless you command get bought an nervousness over that you wish be delivering the following unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you shield this hike
I simply could not go away your web site prior to suggesting that I really enjoyed the standard info a person supply on your guests Is going to be back incessantly to investigate crosscheck new posts
I have been browsing online more than three hours today yet I never found any interesting article like yours It is pretty worth enough for me In my view if all website owners and bloggers made good content as you did the internet will be a lot more useful than ever before
Thank you for the auspicious writeup It in fact was a amusement account it Look advanced to far added agreeable from you However how can we communicate
I was suggested this web site by my cousin Im not sure whether this post is written by him as no one else know such detailed about my trouble You are incredible Thanks
I just could not leave your web site before suggesting that I really enjoyed the standard information a person supply to your visitors Is gonna be again steadily in order to check up on new posts
I do not even know how I ended up here but I thought this post was great I dont know who you are but definitely youre going to a famous blogger if you arent already Cheers
hiI like your writing so much share we be in contact more approximately your article on AOL I need a specialist in this area to resolve my problem Maybe that is you Looking ahead to see you
I do agree with all the ideas you have introduced on your post They are very convincing and will definitely work Still the posts are very short for newbies May just you please prolong them a little from subsequent time Thank you for the post
Usually I do not read article on blogs however I would like to say that this writeup very compelled me to take a look at and do so Your writing taste has been amazed me Thanks quite nice post
Magnificent beat I would like to apprentice while you amend your site how can i subscribe for a blog web site The account helped me a acceptable deal I had been a little bit acquainted of this your broadcast offered bright clear idea
My brother recommended I might like this web site He was totally right This post actually made my day You cannt imagine just how much time I had spent for this information Thanks
I loved as much as you will receive carried out right here The sketch is attractive your authored material stylish nonetheless you command get got an impatience over that you wish be delivering the following unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you shield this hike
greate men ..
greate post i love it..
greate post i love very goood..
????? ??????, ??????????, ???? ?? ???????? ??????????? ?????????? ? ???????. ?????????? ? 1935 ????, ?? ???? ?????? ???-?-????? ????????? ?????? ?????????????? ????? ? ????????????? ??????. ??? ?????? ?????, ????? ??? „Can’t Help Falling in Love“, „Suspicious Minds“ ? „Jailhouse Rock“, ????? ????????? ????? ? ?????????? ????????? ??????????? ?? ????? ????. ?????? ????? ???????? ?????? ??????????? ????????????? ? ????????? ????????, ??? ??????? ??? ???????? ?? ?????? ? ??????, ?? ? ? ?????????????. ??? ???????? ???????? ????? ? ??????????? ????? ????????? ????????. ??????? ?????? 2024 ???? ? ??????? ?????? ????????? mp3.
DumpsWrap offers CompTIA CompTIA PenTest+ Certification Exam real exam questions and practice test engine with real questions and verified answers. Try CompTIA PenTest+ Certification Exam exam questions for free. You can also download a free PDF demo of CompTIA CompTIA PenTest+ Certification Exam exam. Our CompTIA PenTest+ Certification Exam Combo Package for which includes PDF (Printable Format) and Testing Engine (Works on Windows and MAC) which ensures you to go through all certification topics and provides you ultimate satisfaction to pass your exam in your first attempt.
greate post i like very much..
This webpage is fabulous. The superb information shows the maker’s earnestness. I’m dazed and envision additional such incredible presents on.
very informative article men keep posting..
wow men thats great very nice post..
men thats great very good..
men thats great very nice..
Fantastic beat I would like to apprentice while you amend your web site how could i subscribe for a blog site The account helped me a acceptable deal I had been a little bit acquainted of this your broadcast offered bright clear concept
helloI really like your writing so a lot share we keep up a correspondence extra approximately your post on AOL I need an expert in this house to unravel my problem May be that is you Taking a look ahead to see you