<p>I'm trying to setup a kubernetes cluster with kubeadm and vagrant. I faced an error during installing nginx ingress controller was timeout when the pods is trying to retrieve the configmap through kubernetes API. I have looked around and trying to apply their solution, still no luck, this is the reason I come out with this post.</p>

<p>Environment:</p>

<p>I'm using vagrant to setup 2 nodes with ubuntu/xenial image.</p>

<pre><code>kmaster
-------------------------------------------
network:
Adapter1: NAT
Adapter2: HostOnly-network, IP:192.168.2.71

kworker1
-------------------------------------------
network:
Adapter1: NAT
Adapter2: HostOnly-network, IP:192.168.2.72
</code></pre>

<p>I followed the kubeadm to setup the cluster</p>

<p><a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="nofollow noreferrer">[Setup kubernetes with kubeadm]</a>
<br/></p>

<p>And my kube cluster init command as below:</p>

<pre><code>kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address=192.168.2.71
</code></pre>

<p>and apply calico network plugin policy:</p>

<pre><code>kubectl apply -f \
https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/etcd.yaml

kubectl apply -f \
https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/calico.yaml
</code></pre>

<p>(Calico is a plugin I currently successful installed with, I will come out another post for flannel plugin which the plugin unable to access the service)</p>

<p>I'm using helm to install ingress controller followed  the tutorial
<a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/</a></p>

<p>That's the error occurred once I applied helm deploy command when I describe the pod</p>

<p><a href="https://i.stack.imgur.com/0i0CK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0i0CK.png" alt="Helm Ingress Error"></a></p>

<p>Appreciate someone can help, as I know the reason was the pod unable to access kubernetes API. But not this already should enable by kubernetes by default?</p>

<p>My kubesystem pods status as below:
<a href="https://i.stack.imgur.com/vfjgJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vfjgJ.png" alt="kube system pods"></a></p>

<p>Another solution provided from kubernetes official website:</p>

<p>1) install kube-proxy with sidecar, I still new with kubernetes and I'm looking for example how to install kube-proxy with sidecar. Appreciate if someone could provide an example.</p>

<p>2) use client-go, I'm very confuse when I read this post, it seems that using go command to pull the go script, and I have no clue how's it working with kubernetes pods.</p>

A1ucard
<p>You guys are right, I have tested with digital ocean's droplet and it works as expected,  I hit another error is "forbidden, user service account not permitted". Look like the pods is able to access the kubernetes api already. I also tested install istio which I encountered the same issue before, and now it worked in digital ocean droplet.</p>

<p>Thank you guys.</p>
