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

K8S upgrade V1.14.0

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. View the container image version of this version:

Kubeadm config images list

The output is as follows:

~ # kubeadm config images listk8s.gcr.io/kube-apiserver:v1.14.0k8s.gcr.io/kube-controller-manager:v1.14.0k8s.gcr.io/kube-scheduler:v1.14.0k8s.gcr.io/kube-proxy:v1.14.0k8s.gcr.io/pause:3.1k8s.gcr.io/etcd:3.3.10k8s.gcr.io/coredns:1.3.1

2. Pull the container image

The original kubernetes image file is on gcr and cannot be downloaded directly. Here are the resources on Ali Cloud, which are executed on all hosts (this script is executed on both master and node).

Echo "" echo "= =" echo "Pull Kubernetes v1.14.0 Images from aliyuncs.com." echo "= =" echo "" MY_REGISTRY=registry.cn-hangzhou.aliyuncs.com/openthings## pulls the image docker pull ${MY_REGISTRY} / k8s-gcr-io-kube-apiserver:v1.14.0docker pull ${MY_REGISTRY} / k8s-gcr-io-kube-controller-manager:v1.14.0docker pull ${MY_REGISTRY} / k8sMugcrashi IoMube- Scheduler:v1.14.0docker pull ${MY_REGISTRY} / k8s-gcr-io-kube-proxy:v1.14.0docker pull ${MY_REGISTRY} / k8s-gcr-io-etcd:3.3.10docker pull ${MY_REGISTRY} / k8s-gcr-io-pause:3.1docker pull ${MY_REGISTRY} / k8s-gcr-io-coredns:1.3.1## add Tagdocker tag ${MY_REGISTRY} / k8s-gcr-io-kube-apiserver:v1.14.0 K8s.gcr.io/kube-apiserver:v1.14.0docker tag ${MY_REGISTRY} / k8s-gcr-io-kube-scheduler:v1.14.0 k8s.gcr.io/kube-scheduler:v1.14.0docker tag ${MY_REGISTRY} / k8s-gcr-io-kube-controller-manager:v1.14.0 k8s.gcr.io/kube-controller-manager:v1.14.0docker tag ${MY_REGISTRY} / k8s-gcr-io-kube-proxy:v1.14.0 k8s. Gcr.io/kube-proxy:v1.14.0docker tag ${MY_REGISTRY} / k8s-gcr-io-etcd:3.3.10 k8s.gcr.io/etcd:3.3.10docker tag ${MY_REGISTRY} / k8s-gcr-io-pause:3.1 k8s.gcr.io/pause:3.1docker tag ${MY_REGISTRY} / k8s-gcr-io-coredns:1.3.1 k8s.gcr.io/coredns:1.3.1docker rmi ${MY_REGISTRY} / k8s -gcr-io-kube-apiserver:v1.14.0docker rmi ${MY_REGISTRY} / k8s-gcr-io-kube-controller-manager:v1.14.0docker rmi ${MY_REGISTRY} / k8s-gcr-io-kube-scheduler:v1.14.0docker rmi ${MY_REGISTRY} / k8s-gcr-io-kube-proxy:v1.14.0docker rmi ${MY_REGISTRY} / k8s-gcr-io-etcd:3.3.10docker rmi ${MY_REGISTRY} / k8sMurray gcrmurio- Pause:3.1docker rmi ${MY_REGISTRY} / k8s-gcr-io-coredns:1.3.1echo "" echo "= =" echo "Pull Kubernetes v1.14.0 Images FINISHED." echo "into registry.cn-hangzhou.aliyuncs.com/openthings "echo" = = "echo"

Save as a shell script and execute it.

3. Upgrade Kubernetes cluster

First take a look at the versions of the components that need to be upgraded.

Using kubeadm upgrade plan, the version upgrade information is output as follows:

COMPONENT CURRENT AVAILABLEAPI Server v1.13.4 v1.14.0Controller Manager v1.13.4 v1.14.0Scheduler v1.13.4 v1.14.0Kube Proxy v1.13.4 v1.14.0CoreDNS 1.2.6 1.3.1Etcd 3.2.24 3.3.10

Make sure that the container image above has been downloaded (if not downloaded in advance, it may be suspended by the network), and then perform the upgrade on master (I am using the mode of 1 master,2 node. If there is more than one master that needs to be executed on all master):

Kubeadm upgrade-y apply v1.14.0

If you see the following message, OK it.

[upgrade/successful] SUCCESS! Your cluster was upgraded to "v1.14.0". Enjoy!

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