升级
如何升级 Kubernetes 集群
· ☕ 1 分钟
升级思路是,驱逐负载、摘除流量之后,先升级控制节点,后升级工作节点。 1. 查看集群版本 1 2 3 4 kubectl version Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.0", GitCommit:"c2b5237ccd9c0f1d600d3072634ca66cefdf272f", GitTreeState:"clean", BuildDate:"2021-08-04T17:57:25Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"} 当前版本是 1.22,由于 kubeadm 不允许跨版本升级,这里准备升级到 1.23 。 2. 添加 Kubernetes 安装源 CentOS 操作系统: 1 2 3 4 5 6 7