kubeadm1.13.3升级1.13.4

作者: root007 分类: kubeadm,kubernetes 发布时间: 2019-03-14 11:25

https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/

检查可用于升级的版本,并验证当前群集是否可升级

[root@k8s-master ~]# kubeadm upgrade plan

查看集群版本

[root@k8s-master ~]# kubectl  get nodes 
NAME         STATUS   ROLES    AGE   VERSION
k8s-master   Ready    master   68m   v1.13.4
node1        Ready    <none>   68m   v1.13.3
node2        Ready    <none>   66m   v1.13.3


在每个 $NODE 节点上升级 Kubernetes 软件包版本 kubelet kubeadm kubectl

查看可用版本

yum list –showduplicates | grep ‘kubeadm\|kubectl\|kubelet’
yum install -y kubelet kubeadm kubectl

查看版本的容器镜像版本:

[root@k8s-master ~]# kubeadm config images list

由于默认镜像站被墙使用首先的去其他镜像站拉取镜像修改tag

#!/bin/bash

images=(kube-apiserver:v1.13.4 kube-controller-manager:v1.13.4 kube-scheduler:v1.13.4 kube-proxy:v1.13.4 pause:3.1 etcd:3.2.24)

for imageName in ${images[@]} ; do

docker pull mirrorgooglecontainers/$imageName

docker tag mirrorgooglecontainers/$imageName k8s.gcr.io/$imageName

docker rmi mirrorgooglecontainers/$imageName

done
[root@k8s-master ~]# docker images
REPOSITORY                           TAG                 IMAGE ID            CREATED             SIZE
calico/node                          v3.4.3              b6a9f04ba7af        4 days ago          79.6MB
calico/cni                           v3.4.3              87d1d0426f56        4 days ago          75.4MB
calico/kube-controllers              v3.4.3              57718fa8402d        4 days ago          56.5MB
k8s.gcr.io/kube-proxy                v1.13.4             fadcc5d2b066        13 days ago         80.3MB
k8s.gcr.io/kube-apiserver            v1.13.4             fc3801f0fc54        13 days ago         181MB
k8s.gcr.io/kube-controller-manager   v1.13.4             40a817357014        13 days ago         146MB
k8s.gcr.io/kube-scheduler            v1.13.4             dd862b749309        13 days ago         79.6MB

将Kubernetes群集升级到指定版本

kubeadm upgrade apply v1.13.4

升级主节点和其他节点

准备为每个节点进行维护,将其标记为不可调度并移出工作负载:

kubectl cordon $NODE
kubectl drain $NODE --ignore-daemonsets 
在 master 节点上,您必须增加 --ignore-daemonsets忽略了所有的daemonset的pod,并且将剩余的pod驱逐;
在除主节点之外的每个节点上,升级 kubelet 配置:

kubeadm upgrade node config --kubelet-version $(kubelet --version | cut -d ' ' -f 2)
重启 kubelet 进程:
systemctl restart kubelet
kubectl uncordon $NODE

再次验证 kubectl get nodes

发表评论

邮箱地址不会被公开。 必填项已用*标注


  • http://ediconcept.odns.fr/maillotdefootpascher.html
  • http://ediconcept.odns.fr/maillotsfootpascher.html
  • http://ediconcept.odns.fr/maillotsfootpascher2022.html
  • https://sergiofajardo.co/maillotdefootpascher.html
  • https://sergiofajardo.co/maillotsfootballpascher.html
  • https://sergiofajardo.co/maillotsfootpascherfrance.html
  • https://allphonetoys.com/maillotdefootpascher.html
  • https://allphonetoys.com/nouveaumaillotdefootpascher.html
  • https://allphonetoys.com/nouveaumaillotsdefootball.html
  • http://samosystem.nichost.ru/maillotdefootpascher.html
  • http://samosystem.nichost.ru/nouveaumodèlemaillotdefoot.html
  • http://samosystem.nichost.ru/pascherfemmesfootballjersey.html
  • http://w96397on.beget.tech/maillotdefootpascher.html
  • http://w96397on.beget.tech/pascherfootballt-shirts.html
  • http://w96397on.beget.tech/paschermaillotsdefootpromo.html
  • http://wesleywang.acsite.org/maillotdefootpascher.html
  • https://wesleywang.acsite.org/repliquemaillotsdefootballlivraisongratuite.html
  • https://wesleywang.acsite.org/retrovintagesoccerjerseys.html
  • https://www.rnkhabri.com/maillotdefootpascher.html
  • https://www.rnkhabri.com/personnaliséenfantssoccerjersey.html
  • https://www.rnkhabri.com/personnaliséfemmessoccervêtements.html
  • https://www.oujdacity.net/maillotdefootpascher.html
  • https://www.oujdacity.net/sitedemaillotdefootpascher.html
  • https://www.oujdacity.net/survetementdefoot.html
  • https://infendo.com/maillotdefootpascher.html
  • https://infendo.com/survetementdefootpascher.html
  • https://infendo.com/uniformedefootballdesjeunes.html
  • https://planitagency.com/maillotdefootpascher.html
  • https://planitagency.com/ventemaillotdefootpascherthailande2022.html
  • https://planitagency.com/vesteequipedefoot.html
  • http://immergut.com.br
  • https://immobiliarelerosemarine.com
  • https://immobilienfotografie24.de
  • http://immobilier-lemaroc.com
  • https://imobilideranca.com.br
  • https://impactdigital.space
  • https://imperibiza.com
  • https://impexworldltd.com
  • https://implant.gen.tr
  • https://impread.com
  • http://improveyourdance.com
  • http://improvisamos.com
  • http://impulsarh.com.ar
  • http://inamakethat.com
  • http://inanna.be
  • https://incomementorbox.com
  • https://incomerepairpro.com
  • https://indiatvnewss.com
  • https://indoranews.com
  • https://infendo.com
  • https://infinitebankingagenttraining.com
  • https://infinnium.com
  • http://influenceyourway.com
  • http://infocarbrokers.net
  • http://infohealth-usa.com
  • https://informatic-crew.fr
  • https://informatiotech.com
  • https://informeblumenau.com
  • https://infos-grossesse.fr
  • https://ingatlanmagus.com