Rancher 配置
概述
参考:
Rancher Server URL 的修改
当 Rancher Server URL 变更后(比如从 40443 变到 60443),则还需要连带修改以下几部分
- Rancher Web 页面最上面的标签,进入 - 系统设置,修改- server-url。
- k8s 集群中,修改 cattle-system 名称空间中,名为 - cattle-credentials-XXX的 secret 资源中的 .data.url 字段的值,这个值是用 base64 编码的。
- echo -n “https://X.X.X.X:60443” | bas64 ,通过该命令获取编码后的 url,然后填入 .data.url 字段中 
- k8s 集群中,修改 cattle-cluster-agent-XX 和 cattle-node-agent-XX 这些 pod 的 env 参数,将其中的 CATTLE_SERVER 的值改为想要的 URL。 
- cattle-node-agent 在 2.5.0 版本之后没有了,就不用改了。 
导入集群的 yaml 文件位置
打开 https://RancherIP/v3/cluster/集群ID/clusterregistrationtokens 页面
在 data 字段下,可以看到获取 yaml 文件的 URL,可能会有多组,一般以时间最新的那组为准。

反馈
此页是否对你有帮助?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.