kubernetes unhealthy ingress backend

后端 未结 4 1876
自闭症患者
自闭症患者 2021-02-01 03:16

I followed the load balancer tutorial: https://cloud.google.com/container-engine/docs/tutorials/http-balancer which is working fine when I use the Nginx image, when I try and u

4条回答
  •  无人共我
    2021-02-01 03:53

    You need to add a readinessProbe (just copy your livenessProbe).

    It's explained in the GCE L7 Ingress Docs.

    Health checks

    Currently, all service backends must satisfy either of the following requirements to pass the HTTP health checks sent to it from the GCE loadbalancer: 1. Respond with a 200 on '/'. The content does not matter. 2. Expose an arbitrary url as a readiness probe on the pods backing the Service.

    Also make sure that the readinessProbe is pointing to the same port that you expose to the Ingress. In your case that's fine since you have only one port, if you add another one you may run into trouble.

提交回复
热议问题