curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
[root@ky-test ~]# ping 192.168.40.220
PING 192.168.40.220 (192.168.40.220) 56(84) bytes of data.
64 bytes from 192.168.40.220: icmp_seq=1 ttl=64 time=2.96 ms
64 bytes from 192.168.40.220: icmp_seq=2 ttl=64 time=0.114 ms
日志
kubectl -n cattle-system logs cattle-cluster-agent-96f86b66b-k5jds --previous
INFO: Environment: CATTLE_ADDRESS=10.42.120.2 CATTLE_CA_CHECKSUM=dfc43177c7204bb998b3076aa1619c2c5110b3adf73f173b528ff0ea40d187bc CATTLE_CLUSTER=true CATTLE_CLUSTER_AGENT_PORT=tcp://10.43.65.46:80 CATTLE_CLUSTER_AGENT_PORT_443_TCP=tcp://10.43.65.46:443 CATTLE_CLUSTER_AGENT_PORT_443_TCP_ADDR=10.43.65.46 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PORT=443 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_PORT_80_TCP=tcp://10.43.65.46:80 CATTLE_CLUSTER_AGENT_PORT_80_TCP_ADDR=10.43.65.46 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PORT=80 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_SERVICE_HOST=10.43.65.46 CATTLE_CLUSTER_AGENT_SERVICE_PORT=80 CATTLE_CLUSTER_AGENT_SERVICE_PORT_HTTP=80 CATTLE_CLUSTER_AGENT_SERVICE_PORT_HTTPS_INTERNAL=443 CATTLE_CLUSTER_REGISTRY=repo.yousen.plus CATTLE_FEATURES=embedded-cluster-api=false,fleet=false,monitoringv1=false,multi-cluster-management=false,multi-cluster-management-agent=true,provisioningv2=false,rke2=false CATTLE_INGRESS_IP_DOMAIN=sslip.io CATTLE_INSTALL_UUID=f25f086d-3060-4582-97c9-268715f1c0c7 CATTLE_INTERNAL_ADDRESS= CATTLE_IS_RKE=false CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=cattle-cluster-agent-96f86b66b-k5jds CATTLE_RANCHER_WEBHOOK_VERSION= CATTLE_SERVER=https://192.168.40.220 CATTLE_SERVER_VERSION=v2.8.3
INFO: Using resolv.conf: search cattle-system.svc.cluster.local svc.cluster.local cluster.local nameserver 10.43.0.10 options ndots:5
ERROR: https://192.168.40.220/ping is not accessible (Failed to connect to 192.168.40.220 port 443 after 1055 ms: Couldn’t connect to server)
[root@ky-test ~]# telnet 192.168.40.220 443
Trying 192.168.40.220…
Connected to 192.168.40.220.
Escape character is ‘^]’.
^CConnection closed by foreign host.
[root@ky-test-master ~]# kubectl get events --namespace=cattle-system --watch
LAST SEEN TYPE REASON OBJECT MESSAGE
3m3s Warning FailedScheduling pod/cattle-cluster-agent-7f766b8f87-q5lv8 0/1 nodes are available: 1 node(s) had untolerated taint {node.kubernetes.io/not-ready: }. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling…
2m37s Normal Scheduled pod/cattle-cluster-agent-7f766b8f87-q5lv8 Successfully assigned cattle-system/cattle-cluster-agent-7f766b8f87-q5lv8 to ky-test-master
2m37s Warning FailedCreatePodSandBox pod/cattle-cluster-agent-7f766b8f87-q5lv8 Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox “a8f96d6496157e4fc5d29befafb1335804306429e1ac545f207e45d6b9f1dfc5”: plugin type=“calico” failed (add): stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/
2m24s Normal SandboxChanged pod/cattle-cluster-agent-7f766b8f87-q5lv8 Pod sandbox changed, it will be killed and re-created.
2m23s Normal Pulling pod/cattle-cluster-agent-7f766b8f87-q5lv8 Pulling image “repo.yousen.plus/rancher/rancher-agent:v2.8.3”
101s Normal Pulled pod/cattle-cluster-agent-7f766b8f87-q5lv8 Successfully pulled image “repo.yousen.plus/rancher/rancher-agent:v2.8.3” in 42.013581071s (42.013589033s including waiting)
52s Normal Created pod/cattle-cluster-agent-7f766b8f87-q5lv8 Created container cluster-register
52s Normal Started pod/cattle-cluster-agent-7f766b8f87-q5lv8 Started container cluster-register
52s Normal Pulled pod/cattle-cluster-agent-7f766b8f87-q5lv8 Container image “repo.yousen.plus/rancher/rancher-agent:v2.8.3” already present on machine
13s Warning BackOff pod/cattle-cluster-agent-7f766b8f87-q5lv8 Back-off restarting failed container cluster-register in pod cattle-cluster-agent-7f766b8f87-q5lv8_cattle-system(1a2d5d7b-f37e-4fc8-9135-448ba8d706b8)
3m4s Normal SuccessfulCreate replicaset/cattle-cluster-agent-7f766b8f87 Created pod: cattle-cluster-agent-7f766b8f87-q5lv8
3m5s Normal ScalingReplicaSet deployment/cattle-cluster-agent Scaled up replica set cattle-cluster-agent-7f766b8f87 to 1
0s Normal Pulled pod/cattle-cluster-agent-7f766b8f87-q5lv8 Container image “repo.yousen.plus/rancher/rancher-agent:v2.8.3” already present on machine
0s Normal Created pod/cattle-cluster-agent-7f766b8f87-q5lv8 Created container cluster-register