Get the App
SLTechnology News&Howtos  ›  Servers  › 

K8S upgrade V1.14.0

Shulou Source: shulou.com Published: 2022-06-02 16:20:26 09月22日 Update

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!

Tags: Mirror upgrade version container information script output original multiple all master file mode component network resource cluster facet Ali Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology OPPO Reno Docker Redmi Microsoft