2

I tried to use microk8s add-node in first machine. and second machine, I tried to microk8s join <>:<>/<> --worker but it returns this:

the host name of the joining node does not resolve to the IP Refusing join (400)

halfer
  • 19,824
  • 17
  • 99
  • 186
nobody1879
  • 41
  • 4

1 Answers1

8

You need to make sure the control plane node can also resolve the hostname of the workers.

Add on the /etc/hosts of the control plane node: e.g.:

192.168.0.10 workerName
halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    This should be in the documentation! Thanks a lot. Nearly destroyed my keyboard – Mysterio Oct 11 '22 at 19:47
  • I found that adding the worker entry into the master control plane probably did help, but I also needed to restart the microk8s service on the master, which forces `microk8s join` to create a new token. – halfer May 06 '23 at 08:37
  • I am new to microk8s, and thus far I am of mixed opinions - the joining seems to be brittle, and the errors on the master are not helpful. But I am not convinced it will be easier with standard K8S! – halfer May 06 '23 at 08:40