kubernetes master starts only on tcp6 , how to join a node?

9/25/2019

I have a local Kubernetes master started on a tcp6:6443 but not on tcp so how to start a kubeadm join for using the right port?

tcp6       0      0 :::10250                :::*                    LISTEN      -
tcp6       0      0 :::6443                 :::*                    LISTEN      -
tcp6       0      0 :::10251                :::*                    LISTEN      -
Starting Nmap 7.01 ( https://nmap.org ) at 2019-09-25 15:40 CEST
Nmap scan report for 10.0.2.15
Host is up (0.000081s latency).
PORT     STATE  SERVICE
6443/tcp closed unknown
-- Herve Meftah
kubernetes

1 Answer

10/7/2019

You should run the below command (on master host):

$ kubeadm init --apiserver-advertise-address=<private-ip of master host>

--apiserver-advertise-address parameter - if the node should host a new control plane instance, the IP address the API Server will advertise it's listening on. If not set the default network interface will be used.

Now try to run the join command that was generated in the output of kubeadm init. It should works fine.

Also, what you can check is a firewall running on your master node that should be disabled. It’s blocking incoming traffic.

systemctl stop firewalld
-- muscat
Source: StackOverflow