Toggle navigation
首页
技术
骑行
羽毛球
资讯
联络我
登录
升级k8s
2020-04-23
kubernetes
> 本文介绍如何安装和升级使用rancher搭建的k8s ## 2020/04/23更新 rke 1.1.0 版新增了重大功能,无需停机即可更新 k8s 集群,详情参见:[how-upgrades-work](https://rancher.com/docs/rke/latest/en/upgrades/how-upgrades-work/) 1. 下载 rke 在 [rke release note](https://github.com/rancher/rke/releases/) 页面下载需要的版本 2. 查看 rke 支持的 k8s 版本 ./rke config --list-version --all 3. 配置 cluster.yaml,指定 k8s 版本 kubernetes_version: "v1.17.4-rancher1-3" 4. 运行命令,更新集群 ./rke up --config cluster.yml ----- ## 安装 (RKE Intallation)[https://rancher.com/docs/rke/latest/en/installation/] 对于cluster.yml,最简单的输入下面的内容即可: ```yaml nodes: - address: xxx user: xxx role: [controlplane,etcd] ssh_key_path: ~/.ssh/id_rsa - address: xxx user: xxx role: [worker] ssh_key_path: ~/.ssh/id_rsa # If set to true, RKE will not fail when unsupported Docker version are found ignore_docker_version: true ``` ## 升级 rke version v0.3.0 1. 首先升级rke,直接下载新的binary即可 2. 找到之前用rke搭建k8s集群时使用的配置文件(cluster.yml),生成的 kube_config_cluster.yml 文件 3. 运行 rke up 升级,约定找 cluster.yml 和 kube_config_cluster.yml 两个文件 ## 更新证书 ./rke cert rotate --config cluster.yml https://rancher.com/blog/2019/kubernetes-certificate-expiry-and-rotation-in-rancher-kubernetes-clusters/
×
本文为博主原创,如需转载,请注明出处:
http://www.supperxin.com
返回博客列表