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

GKE ingress controller will failed with "unhealthy" backend because of the Readiness Probe Path #149

Closed
ypan887 opened this issue Dec 14, 2018 · 0 comments · Fixed by #154
Assignees

Comments

@ypan887
Copy link
Contributor

ypan887 commented Dec 14, 2018

The xray-server template has a readiness probe to path "/"

       readinessProbe:
          httpGet:
            path: /
            port: {{ .Values.server.internalPort }}
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 10
        livenessProbe:
          httpGet:
            path: /
            port: {{ .Values.server.internalPort }}
          initialDelaySeconds: 90
          periodSeconds: 10

When installing xray on gke using it's ingress controller, health check will be created pointing to the root path and fall back to the readinessProbe path, which is still the root path.

These will result in an "unhealthy" backend service since if you ping xray from the worker node, you will see that it returns 301 at root path and thought it as unhealty. In stead, the health check should be really looking at path "api/v1/system/ping"

$ curl http://localhost:31469/api/v1/system/ping
{"status":"pong"}

$ curl http://localhost:31469/
<a href="/web">Moved Permanently</a>.

If we manually changed the health check endpoint to '"api/v1/system/ping", the backend healthy check will pass, and xray server can be reached.

You may want to update the readiness probe in the template

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

Successfully merging a pull request may close this issue.

2 participants