<p>AWS + Kubeadm (k8s 1.4)
I tried following the README at: </p>

<blockquote>
  <p><a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx" rel="nofollow">https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx</a></p>
</blockquote>

<p>but that doesnt seem to work. I asked around in slack, and it seems the yamls are out-dated, which i had to modify as such</p>

<p>first i deployed default-http-backend using yaml found on git:</p>

<blockquote>
  <p><a href="https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/examples/default-backend.yaml" rel="nofollow">https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/examples/default-backend.yaml</a></p>
</blockquote>

<p>Next, the ingress-RC i had to modify:</p>

<blockquote>
  <p><a href="https://gist.github.com/lilnate22/5188374" rel="nofollow">https://gist.github.com/lilnate22/5188374</a></p>
</blockquote>

<p>(note the change to get path to <code>healthz</code> to reflect <code>default-backend</code> as well as the port change to <code>10254</code> which is apparently needed according to slack)</p>

<p>Everything is running fine
<code>kubectl get pods</code> i see the ingress-controller
<code>kubectl get rc</code> i see 1 1 1 for the ingress-rc</p>

<p>i then deploy the simple <strong>echoheaders</strong> application (according to git readme):</p>

<pre><code>kubectl run echoheaders --image=gcr.io/google_containers/echoserver:1.4 --replicas=1 --port=8080
kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x
</code></pre>

<p>next i created a simple ingress :</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  backend:
    serviceName: echoheaders-x
    servicePort: 80
</code></pre>

<p>both <code>get ing</code> and <code>describe ing</code> gives be a good sign:</p>

<pre><code>Name:           test-ingress
Namespace:      default
Address:        172.30.2.86   &lt;---this is my private ip
Default backend:    echoheaders-x:80 (10.38.0.2:8080)
Rules:
  Host  Path    Backends
  ----  ----    --------
  * *   echoheaders-x:80 (10.38.0.2:8080)
</code></pre>

<p>but attempting to go to nodes public ip doesnt seem to work, as i am getting "unable to reach server`</p>

<p>Unfortunately it seems that using ingress controllers with Kubernetes clusters set up using kubeadm doesn't is not supported at the moment.</p>

<p>The reason for this is that the ingress controllers specify a <strong>hostPort</strong> in order to become available on the public IP of the node, but the cluster created by kubeadm uses the <a href="http://kubernetes.io/docs/admin/network-plugins/#cni" rel="noreferrer">CNI</a> network plugin <a href="https://github.com/kubernetes/kubernetes/issues/31307" rel="noreferrer">which does not support</a> <strong>hostPort</strong> at the moment.</p>

<p>You may have better luck <a href="http://kubernetes.io/docs/getting-started-guides/" rel="noreferrer">picking a different way to set up the cluster</a> which does not use CNI.</p>

<p>Alternatively, you can edit your ingress-rc.yaml to declare "hostNetwork: true" under the "spec:" section. Specifying <a href="http://kubernetes.io/docs/api-reference/v1/definitions/#_v1_podspec" rel="noreferrer">hostNetwork</a> will cause the containers to run using the host's network namespace, giving them access to the network interfaces, routing tables and iptables rules of the host. Think of this as equivalent to "docker run" with the option --network="host".</p>
