In our application we have been separating the management.server.port
and the server.port
so we can expose the web server easily via Ingress and Service objects and keep the management port only for the Kubernetes liveness
and readiness
probes.
However, in the documentation for Actuator there is this warning:
If your Actuator endpoints are deployed on a separate management context, be aware that endpoints are then not using the same web infrastructure (port, connection pools, framework components) as the main application. In this case, a probe check could be successful even if the main application does not work properly (for example, it cannot accept new connections).
Is there a best practice here? Is it just to implement my own readiness check?