GoogleCloudPlatform / endpoints-samples

Apache License 2.0
89 stars 60 forks source link

Fix the unhealthy backend by adding backend config healthcheck. #70

Closed shuoyang2016 closed 3 years ago

shuoyang2016 commented 3 years ago

This was caught in the internal bug http://b/184422201.

https://cloud.google.com/endpoints/docs/openapi/get-started-kubernetes-engine-espv2?hl=en

Trying this on autopilot running 1.18.16-gke.302, the deployment end up with a broken load balancer with unhealthy backend. After some investigation, this is because the health check configured is sending an HTTP GET / - that returns "404 - The current request is not defined by this API" - as configured.

To fix it you have to modify the health check to send HTTP GET /healthz A possible fix is to add a backend config to the manifest.

shuoyang2016 commented 3 years ago

@qiwzhang thanks for the quick review.