Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Kubeadm upgrade k8s cluster

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Check the cluster version:

View upgradeable cluster versions

Yum list-showduplicates kubeadm-disableexcludes=kubernetes

Yum install-y kubeadm-1.16.3-0-- disableexcludes=kubernetes # all nodes

Kubeadm version

Kubeadm upgrade plan # check whether the cluster can be upgraded and the version information of each component after the upgrade

2. Download the upgraded images

Kubeadm config images list | sed-e's / ^ / docker pull / g'- e's containk8s.gcr.iofuge registry.cnlyhangzhou.aliyuncs.com

Docker images | grep registry.cn-hangzhou.aliyuncs.com/google_containers | awk'{print "docker tag", $1 ":" $2 s/registry.cn-hangzhou.aliyuncs.com 1 ":" $2}'| sed-e 's/registry.cn-hangzhou.aliyuncs.com\ / google_containers/k8s.gcr.io/2' | sh-x

Docker images | grep registry.cn-hangzhou.aliyuncs.com/google_containers | awk'{print "docker rmi" $1 ":" $2}'| sh-x

3. Upgrade the cluster

Kubeadm upgrade apply v1.16.3

Upgrade the master node:

Kubeadm upgrade node

Upgrade individual components

Yum install-y kubelet-1.16.3 kubectl-1.16.3-- disableexcludes=kubernetes

Systemctl daemon-reload

Systemctl restart kubelet

4. Upgrade the worker node

Kubeadm upgrade node

Yum install-y kubelet-1.16.3 kubectl-1.16.3-- disableexcludes=kubernetes

Systemctl daemon-reload

Systemctl restart kubelet

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report