Score:0

Error when create a MicroK8s cluster : Connection failed. The hostname (xx) of the joining node does not resolve to the IP "xx". Refusing join (400)

th flag

I have installed microk8s(1.24/stable) on two machines. The ip of the two machines are:172.29.99.187, 172.29.99.188. I operate the command at 172.29.99.187:microk8s add-node

Output:

From the node you wish to join to this cluster, run the following:
microk8s join 172.29.99.187:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916

Use the '--worker' flag to join a node as a worker not running the control plane, eg:
microk8s join 172.29.99.187:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916 --worker

If the node you are adding is not reachable through the default interface you can use one of the following:
microk8s join 172.29.99.187:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916
microk8s join 192.168.192.122:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916
microk8s join 172.24.0.1:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916
microk8s join 172.30.239.1:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916
microk8s join 172.17.0.1:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916

I operate the command at 172.29.99.188:

microk8s join 172.29.99.187:25000/57a191d07ce8fe360e13f4f1e9026ce8/5be428d4e916

Output:

Contacting cluster at 172.29.99.187
Connection failed. The hostname (cxsw) of the joining node does not resolve to the IP "172.29.99.188". Refusing join (400).
Score:0
th flag

I found the solution on github:https://github.com/canonical/microk8s/issues/2967#issuecomment-1059942384

Edit /etc/hosts on the 172.29.99.188 machine,Add:

172.29.99.188 cxsw
Mysterio avatar
kr flag
Don't forget to add the same IP to the control plane node as well
edib avatar
us flag
or hostnames must be somehow resolvable
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.