I use rancher to create an EC2 cluster on aws, and I get stuck in “Waiting to register with Kubernetes” every time, as shown in the figure below. You can see the error message “Cluster must have at least one etcd plane host: failed to connect to the following etcd host(s)” on the Nodes page of Rancher UI. Does anyone know how to solve it?
After creating the host, it will install Docker and launch an agent to register itself to the cluster and provision the needed components onto the host. This is failing in this case (connecting from Rancher to the host is done using this created agent). This can have many causes, but usually its because the configured
server-url is not reachable by DNS on the created nodes. You can check this by logging into the host and checking the logs of the agent container(s) (
docker logs). See https://rancher.com/docs/rancher/v2.x/en/faq/technical/#how-can-i-access-nodes-created-by-rancher how to access the node. It might even be a resource issue as stated below.
Apart from that, I see you are using
t2.micro which are not recommended to use as the components that are needed for the master require more resources. See https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/node-requirements/ for more documentation. Keep in mind that the 1CPU 1GB for a worker fine should be okay.
I am facing the same error. DNS is getting resolved.
[[root@clm-pun-ufyjc0 ~]# docker logs 45c2d1bca63d
INFO: Environment: CATTLE_ADDRESS=10.135.32.182 CATTLE_INTERNAL_ADDRESS=
INFO: Using resolv.conf: snameserver 172.29.65.137 nameserver 220.127.116.11 nameserver 18.104.22.168
INFO: https://clm-pun-ufyjc0.bmc.com/ping is accessible
INFO: clm-pun-ufyjc0.bmc.com resolves to 127.0.1.1
Could you please help me in fixing this?