Using kubadm to setup a cluster on several cloud providers

10/30/2017

I'm trying to setup a Kubernetes cluster using kubeadm on two machines from two different cloud providers.

These are the steps that I took:

  1. I got two ubuntu machines, one from AWS and one from Google Cloud
  2. I created a VPN and joined the two machines to it
  3. For kubelet, I set --node-ip to the machine's VPN ip address
  4. For kubeadm init, I passed the --apiserver-advertise-address flag and set it to the machine's VPN ip address

I am using kubernetes v1.7.5 and ubuntu 16.04.

I am able to init a new master and join the node to it (using kubeadm join). kubectl get nodes returns both nodes with status Ready.

However, the problem appears when i create a new deployment (or scale an existing one) and the new pod gets allocated on the node. Service discovery and DNS resolution do not work in any pod scheduled on the node. I tried pinging external IPs and it works but anything that has to do with DNS doesn't work. Note that I am using the flannel driver for networking.

I think that the kubernetes built-in DNS is not reachable from the node. Any ideas on how to fix this issue? Is it possible to achieve something like this using kubeadm?

-- Ameer Faraj
cloud
kubeadm
kubernetes

1 Answer

11/5/2017

I'm have no enough reputation that add comment, so I use Answer to add my comment, I have the same problem,that kubectl get node seem to all Ready, but use kubectl get pod -n kube-system

find the pod of flannel is not working, and if flannel not working, that dns must not working

it's seem some problem with flannel version 0.9.0

and that is work for me

wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube- flannel.yml kubectl apply -f kube-flannel.yml

Good luck

-- sam
Source: StackOverflow