Ingress gives 502 error : <p>If I run through the <a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="noreferrer">http load balancer example</a> it works fine in my google container engine project.  When I run "kubectl describe ing" the backend is "HEALTHY".  If I then change the svc out to one that points to my app as shown here:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: app
  labels:
    name: app
spec:
  ports:
  - port: 8000
    name: http
    targetPort: 8000
  selector:
    name: app
  type: NodePort
</code></pre>

<p>The app I'm running is django behind gunicorn and works just find if I make that a load balancer instead of a NodePort.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: main-ingress
spec:
  backend:
    serviceName: app
    servicePort: 8000
</code></pre>

<p>Now when I run "kubectl describe ing" the backend is listed as "UNHEALTHY" and all requests to the ingress IP give a 502.  </p>

<ol>
<li>Is the 502 a symptom of the bad health check?</li>
<li>What do I have to do to make the health check pass?  I'm pretty sure the container running my app is actually healthy.  I never set up a health check so I'm assuming I have to configure something that is not configured, but my googling hasn't gotten me anywhere.</li>
</ol>
