离线安装包见附件 版本都有要求,不要装最新的
指定rancher版本为v2.4.11
1.离线安装docker
注:版本有要求 [1.13.x 17.03.x 17.06.x 17.09.x 18.06.x 18.09.x 19.03]
这里我用的18.09.9
最新的20.2不能用 执行rke up --config ./rancher-cluster.yml 会提示 supported versions are [1.13.x 17.03.x 17.06.x 17.09.x 18.06.x 18.09.x 19.03]
安装前记得关闭防火墙 详见txt
详见https://www.cnblogs.com/mikew/p/11878211.html 链接挂了看txt
2.kubectl 下载安装
注:版本有要求 这里我用的v1.18.10 之前用的较低的版本安装rancher出现错误
安装包拷进来参照文档安装
https://www.cnblogs.com/wangjq19920210/p/11445818.html 附txt
- rke 下载安装
rke二进制文件见附件
将RKE二进制文件复制到您的文件夹中 $PATH 并重命名 rke
mv rke /usr/bin/rke
$ mv rke_linux-amd64 rke
增加可执行权限
chmod +x /usr/local/bin/rke
验证安装
$ rke --version
输出类似下面版本信息
rke version v1.0.5
- helm3 下载安装
helm3二进制文件见附件
针对 Linux 系统,使用下面的命令进行安装
tar -xvf mv linux-amd64/helm /usr/local/bin/helm
$ chmod 700 get_helm.sh
$ ./get_helm.sh
5.ssh-key 和各个节点配置
详见Rancher PaaS 平台搭建.pdf
官方文档:https://docs.rancher.cn/docs/rancher2/installation_new/other-installation-methods/air-gap/install-rancher/_index/
官方文档中证书有两种方式 选项 A - 使用 Rancher 默认的自签名证书 选项 B - 使用已有的证书
这里我采用的自己生成证书
详见https://blog.csdn.net/isea533/article/details/106397248
txt附上我生成证书的命令
6.添加 Helm Chart 仓库
接下来参照官方文档
https://docs.rancher.cn/docs/rancher2/installation_new/other-installation-methods/air-gap/install-rancher/_index/
helm template rancher ./rancher-2.4.11.tgz --output-dir .
–namespace cattle-system
–set hostname=rancher.wx.com
–set ingress.tls.source=secret
–set privateCA=true
–set useBundledSystemChart=true
–set rancherImageTag=v2.4.11
kubectl --kubeconfig kube_config_rancher-cluster.yml logs -l app=ingress-nginx -n ingress-nginx