In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "Kubernetes 1.13.0 how to quickly upgrade", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Kubernetes 1.13.0 how to upgrade quickly" this article.
Kubernetes 1.13.0 has been officially released. Rapid upgrade (including quick download link for domestic images) includes three main steps: upgrading kubeadm/kubectl/kubelet version, pulling images, and upgrading Kubernetes clusters.
Note:
Kubernetes 1.13.0 uses ETCDCTL_API=3, and the current cluster etcd data needs to be backed up and then restored.
Kubernetes version 1.13.0 does not support the latest Docker 18.09. you can only use Docker 18.06 or below to install a specific DockerCE version.
Major changes:
Kube-apiserver/kube-controller-manager/kube-scheduler/kube-proxy has been upgraded to v1.13.0.
Coredns is upgraded to 1.2.6.
Pause:3.1/etcd:3.2.24 has not changed.
1. Upgrade kubeadm/kubectl/kubelet version sudo apt install kubeadm=1.13.0-00 kubectl=1.13.0-00 kubelet=1.13.0-00
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.13.0k8s.gcr.io/kube-controller-manager:v1.13.0k8s.gcr.io/kube-scheduler:v1.13.0k8s.gcr.io/kube-proxy:v1.13.0k8s.gcr.io/pause:3.1k8s.gcr.io/etcd:3.2.24k8s.gcr.io/coredns:1.2.62, pull container image
The original kubernetes image file is on gcr and cannot be downloaded directly. I mirrored it to the container warehouse in the Hangzhou computer room, and it was relatively fast to pull it.
Echo "" echo "=" echo "Pull Kubernetes v1.12.2 Images from aliyuncs.com." echo "= =" echo "" MY_REGISTRY=registry.cn-hangzhou.aliyuncs.com/openthings## pull image docker pull ${MY_REGISTRY} / k8s-gcr-io-kube-apiserver:v1.13.0docker pull ${MY_REGISTRY} / k8s-gcr-io-kube-controller-manager:v1.13.0docker pull ${MY_REGISTRY} / k8sMugcrashi Scheduler:v1.13.0docker pull ${MY_REGISTRY} / k8s-gcr-io-kube-proxy:v1.13.0docker pull ${MY_REGISTRY} / k8s-gcr-io-etcd:3.2.24docker pull ${MY_REGISTRY} / k8s-gcr-io-pause:3.1docker pull ${MY_REGISTRY} / k8s-gcr-io-coredns:1.2.6## add Tagdocker tag ${MY_REGISTRY} / k8s-gcr-io-kube-apiserver:v1.13.0 K8s.gcr.io/kube-apiserver:v1.13.0docker tag ${MY_REGISTRY} / k8s-gcr-io-kube-scheduler:v1.13.0 k8s.gcr.io/kube-scheduler:v1.13.0docker tag ${MY_REGISTRY} / k8s-gcr-io-kube-controller-manager:v1.13.0 k8s.gcr.io/kube-controller-manager:v1.13.0docker tag ${MY_REGISTRY} / k8s-gcr-io-kube-proxy:v1.13.0 k8s. Gcr.io/kube-proxy:v1.13.0docker tag ${MY_REGISTRY} / k8s-gcr-io-etcd:3.2.24 k8s.gcr.io/etcd:3.2.24docker tag ${MY_REGISTRY} / k8s-gcr-io-pause:3.1 k8s.gcr.io/pause:3.1docker tag ${MY_REGISTRY} / k8s-gcr-io-coredns:1.2.6 k8s.gcr.io/coredns:1.2.6echo "echo" = = "echo" Pull Kubernetes v1.13.0 Images FINISHED. "echo" into registry.cn-hangzhou.aliyuncs.com/openthings "echo" by openthings@ https://my.oschina.net/u/2306127."echo "=" echo ""
Save as a shell script and execute it.
Or, download the script: https://github.com/openthings/kubernetes-tools/blob/master/kubeadm/2-images/
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.11.2 v1.12.3Controller Manager v1.11.2 v1.12.3Scheduler v1.11.2 v1.12.3Kube Proxy v1.11.2 v1.12.3CoreDNS 1.1.3 1.2.2Etcd 3.2.18 3.2.24
Make sure that the above container image has been downloaded (if it is not downloaded in advance, it may be suspended by the network), and then perform the upgrade:
Kubeadm upgrade-y apply v1.13.0
If you see the following message, OK it.
[upgrade/successful] SUCCESS! Your cluster was upgraded to "v1.13.0". Enjoynodes 4. Upgrade of work nodes
Each worker node needs to pull the image facing the corresponding version and install the corresponding version of kubelet.
Check the version:
~ $kubectl versionClient Version: version.Info {Major: "1", Minor: "12", GitVersion: "v1.13.0", GitCommit: "4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState: "clean", BuildDate: "2018-10-05T16:46:06Z", GoVersion: "go1.10.4", Compiler: "gc", Platform: "linux/amd64"} Server Version: version.Info {Major: "1", Minor: "12", GitVersion: "v1.13.0", GitCommit: "4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState: "clean" BuildDate: "2018-10-05T16:36:14Z", GoVersion: "go1.10.4", Compiler: "gc", Platform: "linux/amd64"}
View Pod information:
Kubectl get pod-all-namespaces
Done.
The above is all the contents of the article "how to upgrade Kubernetes 1.13.0 quickly". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.