title: How to fix "failed to ensure load balancer" error for nginx ingress
body: <p>When setting a new nginx-ingress using helm and a static ip on Azure the nginx controller never gets the static IP assigned. It always says <code>&lt;pending&gt;</code>.</p>
  
  <p>I install the helm chart as follows - </p>
  
  <pre><code>helm install stable/nginx-ingress --name &lt;my-name&gt; --namespace &lt;my-namespace&gt; --set controller.replicaCount=2 --set controller.service.loadBalancerIP="&lt;static-ip-address&gt;"
  </code></pre>
  
  <p>It says it installs correctly but there is an error listed as well </p>
  
  <blockquote>
    <p>E0411 06:44:17.063913   13264 portforward.go:303] error copying from
    remote stream to local connection: readfrom tcp4
    127.0.0.1:57881->127.0.0.1:57886: write tcp4 127.0.0.1:57881->127.0.0.1:57886: wsasend: An established connection was aborted by the software in your host machine.</p>
  </blockquote>
  
  <p>I then do a <code>kubectl get all -n &lt;my-namespace&gt;</code> and everything is listed correctly just with the external IP as <code>&lt;pending&gt;</code> for the controller.</p>
  
  <p>I then do a <code>kubectl describe -n &lt;my-namespace&gt; service/&lt;my-name&gt;-nginx-ingress-controller</code> and this error is listed under Events - </p>
  
  <blockquote>
    <p>Warning  CreatingLoadBalancerFailed  11s (x4 over 47s) 
    service-controller  Error creating load balancer (will retry): failed
    to ensure load balancer for service
    my-namespace/my-name-nginx-ingress-controller: timed out waiting for the
    condition.</p>
  </blockquote>
  
  <p>Thank you kindly</p>