云计算
1、查看该版本的容器镜像版本:
kubeadm config images list
输出如下:
~# kubeadm config images list
k8s.gcr.io/kube-apiserver:v1.14.0
k8s.gcr.io/kube-controller-manager:v1.14.0
k8s.gcr.io/kube-scheduler:v1.14.0
k8s.gcr.io/kube-proxy:v1.14.0
k8s.gcr.io/pause:3.1
k8s.gcr.io/etcd:3.3.10
k8s.gcr.io/coredns:1.3.1
2、拉取容器镜像
原始的kubernetes镜像文件在gcr上,不能直接下载。下面是阿里云上的资源,所有主机上都执行一下(master和node上都执行该脚本)。
echo
echo ==========================================================
echo Pull Kubernetes v1.14.0 Images from aliyuncs.com ......
echo ==========================================================
echo
MY_REGISTRY=registry.cn-hangzhou.aliyuncs.com/openthings
## 拉取镜像
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-apiserver:v1.14.0
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-controller-manager:v1.14.0
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-scheduler:v1.14.0
docker pull ${MY_REGISTRY}/k8s-gcr-io-kube-proxy:v1.14.0
docker pull ${MY_REGISTRY}/k8s-gcr-io-etcd:3.3.10
docker pull ${MY_REGISTRY}/k8s-gcr-io-pause:3.1
docker pull ${MY_REGISTRY}/k8s-gcr-io-coredns:1.3.1
## 添加Tag
docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-apiserver:v1.14.0 k8s.gcr.io/kube-apiserver:v1.14.0
docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-scheduler:v1.14.0 k8s.gcr.io/kube-scheduler:v1.14.0
docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-controller-manager:v1.14.0 k8s.gcr.io/kube-controller-manager:v1.14.0
docker tag ${MY_REGISTRY}/k8s-gcr-io-kube-proxy:v1.14.0 k8s.gcr.io/kube-proxy:v1.14.0
docker tag ${MY_REGISTRY}/k8s-gcr-io-etcd:3.3.10 k8s.gcr.io/etcd:3.3.10
docker tag ${MY_REGISTRY}/k8s-gcr-io-pause:3.1 k8s.gcr.io/pause:3.1
docker tag ${MY_REGISTRY}/k8s-gcr-io-coredns:1.3.1 k8s.gcr.io/coredns:1.3.1
docker rmi ${MY_REGISTRY}/k8s-gcr-io-kube-apiserver:v1.14.0
docker rmi ${MY_REGISTRY}/k8s-gcr-io-kube-controller-manager:v1.14.0
docker rmi ${MY_REGISTRY}/k8s-gcr-io-kube-scheduler:v1.14.0
docker rmi ${MY_REGISTRY}/k8s-gcr-io-kube-proxy:v1.14.0
docker rmi ${MY_REGISTRY}/k8s-gcr-io-etcd:3.3.10
docker rmi ${MY_REGISTRY}/k8s-gcr-io-pause:3.1
docker rmi ${MY_REGISTRY}/k8s-gcr-io-coredns:1.3.1
echo
echo ==========================================================
echo Pull Kubernetes v1.14.0 Images FINISHED.
echo into registry.cn-hangzhou.aliyuncs.com/openthings,
echo ==========================================================
echo
保存为shell脚本,然后执行。
3、升级Kubernetes集群
先查看一下需要升级的各个组件的版本。
使用kubeadm upgrade plan
,输出的版本升级信息如下:
COMPONENT CURRENT AVAILABLE
API Server v1.13.4 v1.14.0
Controller Manager v1.13.4 v1.14.0
Scheduler v1.13.4 v1.14.0
Kube Proxy v1.13.4 v1.14.0
CoreDNS 1.2.6 1.3.1
Etcd 3.2.24 3.3.10
确保上面的容器镜像已经下载(如果没有提前下载,可能被网络阻隔导致挂起),然后在master上执行升级(我使用的是1个master,2个node的模式。如果是多个master需要在所有master上执行):kubeadm upgrade -y apply v1.14.0
看到下面信息,就OK了。[upgrade/successful] SUCCESS! Your cluster was upgraded to v1.14.0. Enjoy!
网站栏目:K8S升级V1.14.0
网站路径:https://www.cdcxhl.com/article24/cpggce.html
成都网站建设公司_创新互联,为您提供品牌网站制作、网站导航、电子商务、品牌网站设计、网站收录、建站公司
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联