Rancher Server 设置
- Rancher 版本:v2.5.12
- 使用官方Docker命令安装
用户信息
直接使用admin账户操作
问题描述:
导入k3s,复制rancher提供的命令在k3s节点上执行后,cattle-cluster-agent的pod一直处于CrashLoopBackOff状态
重现步骤:
- 使用两台虚拟机,一台使用Docker部署了Rancher2.5.12,另一台使用脚本安装了k3s(仅安装master)
- 没有使用SSL,纯粹为了了解Rancher和K3s的基本使用
- 在导入k3s,复制rancher提供的命令在k3s节点上执行后,cattle-cluster-agent的pod一直处于CrashLoopBackOff状态
- 两个节点没有配置hostname,rancher节点直接是IP访问,k3s也是,能互相ping同
k3s安装脚本如下:
curl -sfL http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_KUBECONFIG_MODE="644" sh -s -
结果:
pod不停重试,无法正常启动
预期结果:
k3s借点能正确导入rancher中
截图:
其他上下文信息:
pod中打印日志如下:
INFO: Environment: CATTLE_ADDRESS=10.42.0.38 CATTLE_CA_CHECKSUM=781e733de9f0a86b5f8c1840c10469a8ce99b50a0e8457fdc80a892f8f44eeab CATTLE_CLUSTER=true CATTLE_CLUSTER_REGISTRY= CATTLE_FEATURES= CATTLE_INGRESS_IP_DOMAIN=sslip.io CATTLE_INSTALL_UUID=27097e3f-698d-4854-b900-9c444a7d29cc CATTLE_INTERNAL_ADDRESS= CATTLE_IS_RKE=false CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=cattle-cluster-agent-795dc788f7-7q9vz CATTLE_SERVER=https://192.168.0.180 CATTLE_SERVER_VERSION=v2.5.12
INFO: Using resolv.conf: search cattle-system.svc.cluster.local svc.cluster.local cluster.local nameserver 10.43.0.10 options ndots:5
INFO: https://192.168.0.180/ping is accessible
INFO: Value from https://192.168.0.180/v3/settings/cacerts is an x509 certificate
time="2022-03-26T11:20:53Z" level=info msg="Listening on /tmp/log.sock"
time="2022-03-26T11:20:53Z" level=info msg="Rancher agent version v2.5.12 is starting"
time="2022-03-26T11:20:53Z" level=info msg="Connecting to wss://192.168.0.180/v3/connect/register with token kqnd4xgnd6n7m8xv2pn5zhjmznxk2q87t6scqrk2zx6r7cqjkql555"
time="2022-03-26T11:20:53Z" level=info msg="Connecting to proxy" url="wss://192.168.0.180/v3/connect/register"
time="2022-03-26T11:20:53Z" level=info msg="Starting user controllers"
time="2022-03-26T11:20:53Z" level=fatal msg="the server could not find the requested resource"
为什么[detail]中的url会被认为是链接。。。。。这样新人没法弄啊