Improvement: add /readiness endpoint for Kubernetes hosting #7252
Replies: 5 comments
-
+1 |
Beta Was this translation helpful? Give feedback.
-
@JorritSalverda Kong already comes with a
|
Beta Was this translation helpful? Give feedback.
-
Kubernetes Ingress requires the readinessProbe to be an httpGet (without autentication), and I'm having a hard time finding an endpoint on the proxy port that returns http status 200 without calling another API... |
Beta Was this translation helpful? Give feedback.
-
I was able to solve my problem by adding a dummy API with a non-existent upstream uri and then using the request-termination plugin to always return status 200. |
Beta Was this translation helpful? Give feedback.
-
I would like to have a proper HTTP health check for Kong too. In our situation, we have Kong fronted by an AWS ELB which executes HTTP requests for health checking. As I have the global http-log plugin configured, @filotti's solution causes all the health checks (6 per minute per ELB instance per Kong instance to be logged. the /liveness can be easily added to the kong NGiNX template. the /readiness would ready to determine the health state of Kong. |
Beta Was this translation helpful? Give feedback.
-
Summary
To run Kong in Kubernetes a /readiness endpoint will tell Kubernetes whether a node is ready to receive traffic and make it part of a service by returning 200 OK. Failing to return 200 OK will - temporarily - remove the node from the service.
Combined with the /liveness endpoint - see #1677 - this makes running Kong in Kubernetes much more effective.
Beta Was this translation helpful? Give feedback.
All reactions