If I run through the http load balancer example 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:
apiVersion: v1
kind: Service
metadata:
name: app
labels:
name: app
spec:
ports:
- port: 8000
name: http
targetPort: 8000
selector:
name: app
type: NodePort
The app I'm running is django behind gunicorn and works just find if I make that a load balancer instead of a NodePort.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: main-ingress
spec:
backend:
serviceName: app
servicePort: 8000
Now when I run "kubectl describe ing" the backend is listed as "UNHEALTHY" and all requests to the ingress IP give a 502.
- Is the 502 a symptom of the bad health check?
- 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.