Ingress gives 502 errors

If I go through the http load balancer example , it works fine in my Google container engine project. When I run the "cubect description", the backend is "HEALTHY." If I then change svc to the one that points to my application, 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 application in which I run is django behind the machine gun, and only works if I make it a load balancer instead of NodePort.

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

Now when I run the “kubectl description”, the backend is displayed as “UNHEALTHY” and all requests to the incoming IP give 502.

  • Is 502 a symptom of a poor health check?
  • , ? , . , , -, , .
+4

Source: https://habr.com/ru/post/1669091/


All Articles