<p>I'm following instructions on <a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers" rel="nofollow noreferrer">how to write a custom Ingress Controller</a> - however for me they stop short of quite an important step - how to assign an Address to the Ingress claimed by this Controller.</p>

<p>So far I've tried to execute the following steps:</p>

<ol>
<li>Deploy the Ingress</li>
</ol>

<p><pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: myWebAppIngress
spec:
  backend:
    serviceName: myWebAppBackendSvc
    servicePort: 8090
</pre></code></p>

<ol start="2">
<li>Deploy the RC with the custom Ingress Controller setting up the ports as below</li>
</ol>

<p><pre><code>ports:
    - containerPort: 80
      hostPort: 80
    - containerPort: 443
      hostPort: 443
</pre></code></p>

<ol start="3">
<li>Note the external IP of the Node on which the Ingress Controller was deployed and </li>
<li>Patch the Ingress with this IP: <code>kubectl patch ingress myWebAppIngress -p='{"status": {"loadBalancer": {"ingress": [{"ip": "&lt;IP noted below&gt;"}]}}}'</code></li>
</ol>

<p>However, this has not assigned an address to my Ingress, as I can see in <code>kubectl get ingress myWebAppIngress</code> Does anyone know what I need to do in order to assign an address to the Ingress?</p>

Marcin Nowrot
<p><code>hostPort</code> exposes your application on given ports on nodes that this app is launched on. This will not give you external IP as it does not ie. provision cloud loadbalancer.</p>

<p>If you want to stick to fully automated k8s setup for this, then first you should be able to correctly use services with <code>LoadBalancer</code> type, and define such service for your ingress controller <a href="http://kubernetes.io/docs/user-guide/services/#type-loadbalancer" rel="nofollow">http://kubernetes.io/docs/user-guide/services/#type-loadbalancer</a></p>

<p>another approach can be to use service of NodePort type (it has the advantage of the nodePort being managed by kube-proxy hence available also on nodes not running the ingress pod) and manually configure your loadbalancer to point to assigned nodePorts.</p>

<p>sidenote: you should never need to fiddle with status field contents</p>
