本文主要是介绍CC00090.CloudKubernetes——|KuberNetes二进制升级.V01|——|kubernetes_master|etcd.v3.4.13——>v3.4.7,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、二进制kubernetes升级说明
### --- kubernetes升级说明~~~ # kubeadm方式:
~~~ kubernetes官方不建议跨大版本升级,建议升级小版本升级:1.17.0——>1.17.1
~~~ # 二进制的方式:
~~~ 可以直接进行跨大版本升级,直接替换配置文件即可:1.17——>.1.19
~~~ kubernetes是节点,在1.16之前是可以使用bata,而1.16之后直接启用了,
~~~ 升级的过程中要注意apiversion更改,防止升级完成之后不能增删改查。
~~~ 升级的过程中,停掉完所有的节点再启动controller-manager
~~~ # 升级是从下往上升级:
~~~ etcd——>k8s-master组件:apiserver、controller-manager、scheduler——>kubelet:升级时涉及到容器的迁移——>END
### --- 查看kubernetes版本并确认升级的版本号
~~~ 查看kubernetes版本号
~~~ 将kubernetes版本升级为v1.17.0——>1.19.5版本[root@k8s-master01 ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.17.0", GitCommit:"8a62859e515889f07e3e3be6a1080413f17cf2c3", GitTreeState:"clean", BuildDate:"2021-04-15T03:28:42Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.17.0", GitCommit:"8a62859e515889f07e3e3be6a1080413f17cf2c3", GitTreeState:"clean", BuildDate:"2021-04-15T03:19:55Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
### --- 查看kubernetes升级版本所对应的组件版本 ~~~ https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md
二、kubernetes-etcd升级说明
### --- 升级etcd流etcd升级流程~~~ ——>备份etcd数据
~~~ ——>下载新版etcd包
~~~ ——>停止etcd
~~~ ——>替换etcd和etcdctl
~~~ ——>启动etcd
### --- 查看kubernetes1.19下etcd对应的版本号
~~~ # kubernetes升级到1.19版本对应可升级的etcd版本为3.4.7
~~~ 注:kubernetes.V1.19.5版本对应的etcd版本号为3.4.7 Update corefile-migration library to 1.0.8 (#91856, @wawa0210) [SIG Node]
Update default etcd server version to 3.4.4 (#89214, @jingyih) [SIG API Machinery, Cluster Lifecycle and Testing]
Update default etcd server version to 3.4.7 (#89895, @jingyih) [SIG API Machinery, Cluster Lifecycle and Testing]
Update default etcd server version to 3.4.9 (#92349, @jingyih) [SIG API Machinery, Cloud Provider, Cluster Lifecycle and Testing]
Update go.etcd.io/bbolt to v1.3.5 (#92350, @justaugustus) [SIG API Machinery and Cloud Provider]
Update opencontainers/runtime-spec dependency to v1.0.2 (#89644, @saschagrunert) [SIG Node]
beta.kubernetes.io/os and beta.kubernetes.io/arch node labels are deprecated. Update node selectors to use kubernetes.io/os and kubernetes.io/arch. (#91046, @wawa0210) [SIG Apps and Node]
kubectl config view now redacts bearer tokens by default, similar to client certificates. The --raw flag can still be used to output full content. (#88985, @puerco)
### --- 下载etcd.v3.4.7版本包
~~~ # 下载etcd版本包[root@k8s-master01 etcd]# wget https://github.com/etcd-io/etcd/releases/download/v3.4.7/etcd-v3.4.7-linux-amd64.tar.gz
~~~ # 查看下载的版本包
[root@k8s-master01 etcd]# ll
-rw-r--r-- 1 root root 17310840 Apr 2 2020 etcd-v3.4.7-linux-amd64.tar.gz
~~~ # 解压版本包
[root@k8s-master01 etcd]# tar -zxvf etcd-v3.4.7-linux-amd64.tar.gz
### --- 查看etcd集群状态
~~~ # 使用etcdctl命令V2版本查看etcd集群信息[root@k8s-master01 etcd]# export ETCDCTL_API=2
[root@k8s-master01 etcd]# etcdctl --ca-file /etc/kubernetes/pki/etcd/etcd-ca.pem --key-file /etc/kubernetes/pki/etcd/etcd-key.pem --cert-file /etc/kubernetes/pki/etcd/etcd.pem --endpoints https://192.168.1.11:2379,https://192.168.1.12:2379,https://192.168.1.13:2379 member list
ac7e57d44f030e8: name=k8s-master02 peerURLs=https://192.168.1.12:2380 clientURLs=https://192.168.1.12:2379 isLeader=false
40ba37809e1a423f: name=k8s-master03 peerURLs=https://192.168.1.13:2380 clientURLs=https://192.168.1.13:2379 isLeader=true
ace8d5b0766b3d92: name=k8s-master01
这篇关于CC00090.CloudKubernetes——|KuberNetes二进制升级.V01|——|kubernetes_master|etcd.v3.4.13——>v3.4.7的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!