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

0 votes

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.

Why is that so?

Oct 5, 2018 in Kubernetes by lina
• 8,100 points
361 views

1 answer to this question.

0 votes

The application must return a 200 status code at '/'. I think this application was returning a 302 (redirect to login), the health check was failing. When the health check fails, the ingress resource returns 502.

answered Oct 5, 2018 by Kalgi
• 39,170 points

Related Questions In Kubernetes

0 votes
1 answer

When I try to connect to the WebSocket through the gateway I get a 403 error

Try upgrading Contour to v0.6.0-beta.3 with IngressRoute You can ...READ MORE

answered Oct 1, 2018 in Kubernetes by Kalgi
• 39,170 points
274 views
0 votes
1 answer

How do I create a service account for my dashboard and get all the credentails

Run the following commands: This command will create ...READ MORE

answered Oct 8, 2018 in Kubernetes by Kalgi
• 39,170 points
214 views
+1 vote
1 answer
0 votes
1 answer

Is it possible to force the pod to run on a specific node?

By default, anti-affinity is not attempted by ...READ MORE

answered Jul 15 in Kubernetes by Sirajul
• 17,240 points
31 views
0 votes
1 answer
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 39,170 points
56 views
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
1,590 views
0 votes
1 answer