3
votes

I am using Ubuntu 16.04 (Xenial) but here's a problem which I face with kubeadm while joinig nodes to my master:

While joining a node to my master, I continuouly get a timeout issue -

[discovery] Failed to request cluster info, will try again: [Get 
https://{{MASTER_IP}}/api/v1/namespaces/kube- 
public/configmaps/cluster-info: dial tcp {{MASTER_IP}}: i/o timeout]
[discovery] Failed to request cluster info, will try again: [Get 
https://{{MASTER_IP}}/api/v1/namespaces/kube- 
public/configmaps/cluster-info: dial tcp {{MASTER_IP}}: i/o timeout]

Note: I have deliberately changed my IP addresses to {{MASTER_IP}} which is nothing but the Master's IP address.

I can ping the master from my node. I can even ssh into it but I can't join it to the cluster. I must also mention that I am not operating behind a proxy (I added this later)

I have tried with flags like no_proxy={{MASTER_IP}} . I have also tried initiating the cluster on the master with the command

sudo kubeadm init --apiserver-advertise-address={{MASTER_IP}}

Where can I possibly go wrong? Please help guys.!!

P.S. - I have gone through the git issues which are related to this. I've tried their solutions but in vain. Here's a link to one of them - https://github.com/kubernetes/kubernetes/issues/58921

2
Any insight guys?? I've currently run out of ideas and this seems to be a wierd issue. This mostly happens when someone is behind a proxy (which I'm not), as I mentioned I can ping and ssh normally to the master machine. What am I missing?Aryak Sengupta
Anyone ever faced a similar issue? I felt it to a very common one as I faced it right at the time of joining nodes.Aryak Sengupta
Are your ports 6443 and 443 available for connecton on master? Do you have web server or other service that would block or filter those ports? Is api server running properly on master, what is response of kubectl get nodes on master?Const
Can you please check kube-proxy logs ?Phagun Baya
Yes. I disabled the firewall and it worked. Thanks for the help.Aryak Sengupta

2 Answers

0
votes

Disabling the firewall worked for me. I was able to connect my Node machine to the master machine using kubeadm join.

0
votes

Most likely you get time out because join token expired, is no longer valid or does not exist on master node. If that is the case then you will not be able to join the cluster.

Solution

Check if join token exists on master node. Execute this command on master node.

$ kubeadm token list 
TOKEN                     TTL       EXPIRES                     USAGES                   DESCRIPTION   EXTRA GROUPS

As you can see there are no tokens. Please create new token.

$ kubeadm token create 123456.abcdefghijklmnop

Once, token is created then you will be able to use it in kubeadm join command.