Rancher Server 设置
- Rancher 版本:2.7.5
- 安装选项 (Docker install/Helm Chart):
docker在线安装
下游集群信息
- Kubernetes 版本: 1.26.7
- Cluster Type (Local/Downstream):
自定义集群
用户信息
admin管理员
主机操作系统:
centos 7.9
问题描述:
节点添加失败(一直处于[Waiting] configuring bootstrap node(s) custom-4347e537a5b3: waiting for probes: kube-apiserver, kubelet状态)
重现步骤:
docker命令:
sudo docker run --privileged -d
–restart=unless-stopped
-p 80:80 -p 443:443
-v /mnt/d/rancher_data:/var/lib/rancher/
rancher/rancher:stable
rancher运行正常,在创建新的自定义集群时,加入新节点(master)
curl --insecure -fL https://192.168.124.46/system-agent-install.sh | sudo sh -s - --server https://192.168.124.46 --label ‘cattle.io/os=linux’ --token 7xm59xvwchwn8pb462gkm66xwf2sdwnjfl7pggb5jzx986gqqlqzj5 --ca-checksum 21b7d2c95bc6c28ee248aad4e74335e80c3126bc0a7b5d7621adb129f3a88a01 --etcd --controlplane --worker
结果:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 30853 0 30853 0 0 183k 0 --:–:-- --:–:-- --:–:-- 183k
[INFO] Label: cattle.io/os=linux
[INFO] Role requested: etcd
[INFO] Role requested: controlplane
[INFO] Role requested: worker
[INFO] Using default agent configuration directory /etc/rancher/agent
[INFO] Using default agent var directory /var/lib/rancher/agent
[INFO] Determined CA is necessary to connect to Rancher
[INFO] Successfully downloaded CA certificate
[INFO] Value from https://192.168.124.46/cacerts is an x509 certificate
[INFO] Successfully tested Rancher connection
[INFO] Downloading rancher-system-agent binary from https://192.168.124.46/assets/rancher-system-agent-amd64
[INFO] Successfully downloaded the rancher-system-agent binary.
[INFO] Downloading rancher-system-agent-uninstall.sh script from https://192.168.124.46/assets/system-agent-uninstall.sh
[INFO] Successfully downloaded the rancher-system-agent-uninstall.sh script.
[INFO] Generating Cattle ID
[INFO] Successfully downloaded Rancher connection information
[INFO] systemd: Creating service file
[INFO] Creating environment file /etc/systemd/system/rancher-system-agent.env
[INFO] Enabling rancher-system-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rancher-system-agent.service to /etc/systemd/system/rancher-system-agent.service.
[INFO] Starting/restarting rancher-system-agent.service
预期结果:
截图:
其他上下文信息:
Rancher主机Docker运行信息
日志