码迷,mamicode.com
首页 > 其他好文 > 详细

k8s 版本升级

时间:2020-01-20 12:50:00      阅读:61      评论:0      收藏:0      [点我收藏+]

标签:proxy   csharp   pre   open   image   mct   cat   内容   har   

kubernetes 状态
$ kubectl get node
NAME                          STATUS   ROLES    AGE    VERSION
k8s-master01.gdfsxxds.rjyun   Ready    master   105d   v1.14.0
k8s-master02.gdfsxxds.rjyun   Ready    master   105d   v1.14.0
k8s-master03.gdfsxxds.rjyun   Ready    master   105d   v1.14.0
k8s-node01.gdfsxxds.rjyun     Ready    <none>   105d   v1.14.0
k8s-node02.gdfsxxds.rjyun     Ready    <none>   105d   v1.14.0
k8s-node03.gdfsxxds.rjyun     Ready    <none>   105d   v1.14.0
k8s-node04.gdfsxxds.rjyun     Ready    <none>   105d   v1.14.0

 

在所有 master 节点下载镜像,脚本内容
$ cat pull_image.sh
MY_REGISTRY=registry.cn-hangzhou.aliyuncs.com/openthings
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-apiserver:v1.15.0
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-controller-manager:v1.15.0
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-scheduler:v1.15.0
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-proxy:v1.15.0

docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-apiserver:v1.15.0  registry.aliyuncs.com/google_containers/kube-apiserver:v1.15.0
docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-controller-manager:v1.15.0 registry.aliyuncs.com/google_containers/kube-controller-manager:v1.15.0
docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-scheduler:v1.15.0  registry.aliyuncs.com/google_containers/kube-scheduler:v1.15.0
docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-proxy:v1.15.0  registry.aliyuncs.com/google_containers/kube-proxy:v1.15.0

 

在 master01 节点进行操作
yum -y install kubeadm-1.15.0 kubelet-1.15.0 kubectl-1.15.0

升级检查和方案
$ kubeadm upgrade plan
执行更新操作
$ kubeadm upgrade apply v1.15.0
$ systemctl daemon-reload
$ systemctl restart kubelet

 

在其他master 和 node 节点分别执行
yum -y install kubeadm-1.15.0 kubelet-1.15.0 kubectl-1.15.0
systemctl daemon-reload
systemctl restart kubelet

 

检查集群版本
$  kubectl get node
NAME                          STATUS   ROLES    AGE    VERSION
k8s-master01.gdfsxxds.rjyun   Ready    master   105d   v1.15.0
k8s-master02.gdfsxxds.rjyun   Ready    master   105d   v1.15.0
k8s-master03.gdfsxxds.rjyun   Ready    master   105d   v1.15.0
k8s-node01.gdfsxxds.rjyun     Ready    <none>   105d   v1.15.0
k8s-node02.gdfsxxds.rjyun     Ready    <none>   105d   v1.15.0
k8s-node03.gdfsxxds.rjyun     Ready    <none>   105d   v1.15.0
k8s-node04.gdfsxxds.rjyun     Ready    <none>   105d   v1.15.0

  

k8s 版本升级

标签:proxy   csharp   pre   open   image   mct   cat   内容   har   

原文地址:https://www.cnblogs.com/lixinliang/p/12217314.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!