Kubeadm join a new master node fails because of "Initial timeout of 40s passed"

1/1/2021

I have a master node and it works fine. when I get nodes it gives me a master node now I want to add a new master node with following command:

kubeadm join 45.82.137.112:8443 --token 61vi23.i1qy9k2hvqc9k8ib --discovery-token-ca-cert-hash sha256:40617af1ebd8893c1df42f2d26c5f18e05be91b4e2c9b69adbeab1edff7a51ab  --control-plane --certificate-key 4aafd2369fa85eb2feeacd69a7d1cfe683771181e3ee781ce806905b74705fe8

which 45.82.137.112 is my HAProxy IP and I copy this command after creating first master node. after this command I get following error:

[etcd] Announced new etcd member joining to the existing etcd cluster
[etcd] Creating static Pod manifest for "etcd"
[etcd] Waiting for the new etcd member to join the cluster. This can take up to 40s
[kubelet-check] Initial timeout of 40s passed.

and my first master node also disappear and fails. Everything in master1 is ok until I use join command for another master node.

-- aria hamedian
kubeadm
kubernetes

1 Answer

3/2/2021

bro,I've solved the problem,my kubeadm version is 1.20.1 this is my join command: kubeadm join 192.168.43.122:6444 \ --token 689yfz.w60ihod0js5zcina \ --discovery-token-ca-cert-hash sha256:532de9882f2b417515203dff99203d7d7f3dd00a88eb2e8f6cbf5ec998827537 \ --control-plane \ --certificate-key 8792f355dc22227029a091895adf9f84be6eea9e8e65f0da4ad510843e54fbcf \ --apiserver-advertise-address 192.168.43.123

I just add the flag --apiserver-advertise-address 192.168.43.123

-- 浮光掠影
Source: StackOverflow