Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCE ingress health checks #937

Closed
hmeerlo opened this issue Nov 13, 2019 · 2 comments
Closed

GCE ingress health checks #937

hmeerlo opened this issue Nov 13, 2019 · 2 comments

Comments

@hmeerlo
Copy link

hmeerlo commented Nov 13, 2019

Not sure if this is the correct place, but it seems like this is the project most likely to be able to answer my question.
I have a GKE cluster in which I deployed a wordpress helm chart. It has created a GCE ingress controller which in turn created an Google L7 Load balancer. The LB terminates the HTTPS with a certificate created by cert-manager. So far so good. But the health check MUST receive a 200 OK on / which it doesn't because the Wordpress install tries to enforce HTTPS on the call, so it redirects with a 301. This in turn causes the health check to fail. Is it somehow possible to let the load balancer health check add a "x-forwarded-proto: https" header to prevent the 301?

@rramkumar1
Copy link
Contributor

@hmeerlo GCE health checks have a hard requirement that a 200 must be returned on the configured path (we do not control this). However, we allow for manually tuning the health check path so that you can serve a 200 on a different path. Can you try manually modifying your health check (via gcloud or the cloud console) and changing the path to something other than "/"?

@joncotton
Copy link

Same situation here—from Kube specs, the generated infrastructure yields a Backend with a Health Check that doesn't work.

(More specifically, I have a Pod with 2 ports. There's a readinessProbe for the first port. 2 Services and then 2 Ingresses. The first Ingress works fine because its Health Check generates off the readinessProbe. It's the second Service/Ingress/Backend with the problem because, while it has its own HC, that HC doesn't have the necessary customization of the readinessProbe.)

Thank you @rramkumar1 ! I manually modified the HC to change the path, the timings and to add a custom Host header. All those changes stuck, i.e. didn't get automatically reverted. (I was trying to assign a different HC to the Backend and it reverted to the Kube-generated HC within 5 minutes or so.) I do wish to specify this in code, but it's a workable manual task for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants