DEV Community

Discussion on: Setting up Kubernetes on bare metal behind a NAT with OpenVPN

Collapse
 
jedrp profile image
jedrp • Edited

Hi Joe Becher, that really nice post! I follow your post to set up a k8s cluster which contains a bunch of azure VMs(those are not in the same LAN network).
The problem I have is that the worker node can not join the cluster because it can not connect to APIServer, here is some logs:
I1101 08:11:56.774136 86198 round_trippers.go:443] GET 10.8.0.1:6443/api/v1/namespaces/ku... in 30000 milliseconds
I1101 08:11:56.774163 86198 round_trippers.go:449] Response Headers:
I1101 08:11:56.774196 86198 token.go:82] [discovery] Failed to request cluster info, will try again: [Get 10.8.0.1:6443/api/v1/namespaces/ku... dial tcp 10.8.0.1:6443: i/o timeout]

Can you give me some suggestions to solve! <3

Collapse
 
drazisil profile image
Molly Crendraven • Edited

Can you ping 10.8.0.1 from the worker? If not, your openVPN is probably down and i would check the logs for that service on the box.

Collapse
 
jedrp profile image
jedrp

yes I can, From master node I can ping to Worker node and vice-versa! I see that the API server are bind to :::6443 port of the master node, is that the cause of this problem

Thread Thread
 
drazisil profile image
Molly Crendraven

Shouldn't be. Add -v to your kubeadm command and see what its doing.

Thread Thread
 
jedrp profile image
jedrp

Here is the log I got when run "kubeadm join ..." command,

Failed to request cluster info, will try again: [Get 10.8.0.1:6443/api/v1/namespaces/ku... dial tcp 10.8.0.1:6443: i/o timeout]

but I'm still able to ping 10.8.0.1 from the worker node

Thread Thread
 
drazisil profile image
Molly Crendraven

Can you access that URL in your browser on either the worker or the control plane node?

Thread Thread
 
jedrp profile image
jedrp

yes, I'm able to get response when execute the curl command to that URL on master node

Thread Thread
 
jedrp profile image
jedrp

Do we need to tell kubeadm to use "tun0" network interface instead of default one?

Thread Thread
 
drazisil profile image
Molly Crendraven

It sounds like you have a firewall blocking that port then