kubeadm join on another computer in internal wifi network

10/9/2019

Using a ubuntu/kubeadm/virtualbox/calico environment, I am trying to join a node on a computer different from the master's. Access to the master host's virtual machine is granted by a bridged network interface and port forwarding. Kubeadm is initialized with

kubeadm init --apiserver-advertise-address=$MASTER_GUEST_API_SERVER_IP --apiserver-cert-extra-sans=$MASTER_HOST_API_SERVER_IP  --node-name $HOST_NAME --pod-network-cidr=$POD_NETWORK_CIDR_RANGE

On the worker computer, there is the same setting. Now, if I try

kubeadm join $MASTER_HOST_API_SERVER_IP:FORWARDED_MASTER_HOST_API_SERVER_PORT_TO_MASTER_GUEST_API_SERVER_PORT --token XXXXXXXXXXX --discovery-token-ca-cert-hash sha256:XXXXXXXXXXXXX --v=5

it tells me that

[discovery] Successfully established connection with API Server "MASTER_HOST_API_SERVER_IP:FORWARDED_MASTER_HOST_API_SERVER_PORT_TO_MASTER_GUEST_API_SERVER_PORT",

but then fails with

[preflight] Reading configuration from the cluster...                   
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'                                   
Get https://MASTER_GUEST_API_SERVER_IP:MASTER_GUEST_API_SERVER_PORT/api/v1/namespaces/kube-system/configmaps/kubeadm-config: 
dial tcp MASTER_GUEST_API_SERVER_IP:MASTER_GUEST_API_SERVER_PORT : i/o timeout         
    failed to get config map

Can anyone think of a workaround for this problem ?

-- Paul Rousseau
kubeadm
kubernetes

1 Answer

10/10/2019

I feel kind of embarrassed, hope for your clemency, and only don't delete the whole topic to help other people who can't see the forest for the trees:

Don't be root on the worker node machine!!!!

-- Paul Rousseau
Source: StackOverflow