Kubernetes和Spring Boot执行器,在不同端口上运行应用程序和管理的最佳实践?
在我们的应用程序中,我们一直在分开Management.Server.port
和server.port.port
,因此我们可以通过Ingress and Service对象轻松地公开Web服务器并保持管理端口仅适用于Kubernetes LIVISE
和Revageiness
探针。
但是,在执行器的文档中,有这样的警告:
如果您的执行器端点部署在单独的管理上下文上,请注意,端点不会使用相同的Web基础架构(端口,连接池,框架组件)作为主要应用程序。在这种情况下,即使主应用程序无法正常工作(例如,它不能接受新连接),探针检查也可以成功。
。
这里有最好的做法吗?只是为了实施我自己的准备检查吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论