0

I'm Doing some homework ( linuxacademy tutorial ) with kubernetes ( 1 masters and 2 nodes ) Trying add my node1 using command kubeadm join on the node.

The command is pending without any error or result. I have tried on the node2 and I have the exact same result. I must kill the process with ctrl+c to exit

[root@K8SNode2 rbo]# kubeadm join 192.168.1.43:6443 --token 9jh998.01jsgbnvsg9373ix \
>     --discovery-token-ca-cert-hash sha256:60df8024a4ee96018136424af429c5c16ffd15805                                                                                                                53128c83d4fc4861829197f
[preflight] Running pre-flight checks
        [WARNING SystemVerification]: this Docker version is not on the list of valid                                                                                                                ated versions: 19.03.1. Latest validated version: 18.09

running on CentOs7 minimal, installation on master seems good

[rbo@K8SMaster ~]$ kubectl get nodes
NAME        STATUS   ROLES    AGE   VERSION
k8smaster   Ready    master   8h    v1.15.3

Thaks for help

rab
  • 133
  • 2
  • 13
  • Please share `docker version` output of master and compute/worker nodes – prometherion Aug 31 '19 at 08:54
  • @prometherion Master: 'Docker version 19.03.1, build 74b1e89' Nodes: Docker version 19.03.1, build 74b1e89' – rab Aug 31 '19 at 09:31
  • Are you sure the node can communicate with the master? Please try `nc -zv 192.168.1.43 6443` – prometherion Aug 31 '19 at 12:32
  • @prometherion : ( I have installed nc ) nc -zv 192.168.1.43 6443 Ncat: Version 7.50 ( https://nmap.org/ncat ) Ncat: No route to host. But Ping is working fine – rab Aug 31 '19 at 15:57
  • @prometherion Thanks for guided me on the root cause, I have opened the port with firewall command on both side and it's seem's working fine. – rab Aug 31 '19 at 16:17
  • @prometherion: NAME STATUS ROLES AGE VERSION k8smaster Ready master 17h v1.15.3 k8snode1 Ready 95s v1.15.3 The none status for the node is normal ? – rab Aug 31 '19 at 16:18

1 Answers1

3

So, we found the issue wasn't related to unsupported Docker version but to missing Firewalld open port 6443 on Master node: you can solve it using the simple command firewall-cmd --permanent --add-port=6443/tcp along with a firewall-cmd --reload.

After that, the node joined as expected but <none> role is attached and that's expected: you have to follow this solution in order to mark the node as worker using the key-value label node.kubernetes.io/role=worker

prometherion
  • 2,119
  • 11
  • 22