-
Notifications
You must be signed in to change notification settings - Fork 4.7k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Improvement: add /liveness endpoint for Kubernetes hosting #1677
Comments
I currently use |
I use status, too. The thing with a health check is always: If you implement it very light, it does not check much. If you implement it very heavy, it might impacts performance. Maybe a health page and via a query parameter one could supply something like light, normal, heavy. |
+1 |
+1 not just for Kubernetes, but other load balancing environments as well.
|
+1 I ran into huge issues with performance when running Kong on Cassandra using the Once a bit more load was applied the /status endpoint would go up to 2-3 seconds response time and even sometimes go higher than that - leading to a killed Kong Pod in K8s But having a cheap HTTP endpoint would be very beneficial especially for L7 Load Balancing. |
@Tigraine The execProbe is a good workaround. Thank you! |
+1 /status or /health endpoint on HTTP:8000 |
This will be a very nice feature. Too bad that this issue is stalled :( |
With the advent of Kong 0.14, this can be done DIY using its new "Nginx Directive Injection" feature. Here's how I did it -- pardon any typos here as I'm converting from a Terraform-based deployment versus pure YAML. To your "kong-proxy" Deployment, add this to the spec's container environment variable list:
Also add the relevant probes to the spec (which will automatically get picked up by something like GKE's
Now add that "included" file to the container via a ConfigMap; this is the actual health check implementation:
I'm naive as to what the best tests are so just used something simple. I tried to use the result of Something like this should be worked into Kong's Kubernetes examples as it is imperative for exposing Kong behind other load-balancers. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Summary
To run Kong in Kubernetes a /liveness endpoint would be useful. If /liveness fails to return a 200 OK the node will be killed and replaced. Hence this would require information about whether the node is healthy and correctly connected to the cluster. Not to be confused with whether its ready to receive traffic, for that a separate /readiness endpoint is required - see #1678.
The text was updated successfully, but these errors were encountered: