How to support the Kubernetes readiness/liveness probe with Ocelot API Gateway re-routes? How to support the Kubernetes readiness/liveness probe with Ocelot API Gateway re-routes? kubernetes kubernetes

How to support the Kubernetes readiness/liveness probe with Ocelot API Gateway re-routes?


I found out how to do this. It's actually very simple, you just inject the MVC middleware earlier in the pipeline than the Ocelot middleware, and MVC will handle requests to internal endpoints before Ocelot ever sees them.

app.UseMvc();app.UseOcelot().Wait();

Source: https://github.com/ThreeMammals/Ocelot/issues/681