Kubernetes和Spring Boot执行器,在不同端口上运行应用程序和管理的最佳实践?

发布于 2025-02-09 05:43:33 字数 412 浏览 1 评论 0原文

在我们的应用程序中,我们一直在分开Management.Server.portserver.port.port,因此我们可以通过Ingress and Service对象轻松地公开Web服务器并保持管理端口仅适用于Kubernetes LIVISERevageiness探针。

但是,在执行器的文档中,有这样的警告:

如果您的执行器端点部署在单独的管理上下文上,请注意,端点不会使用相同的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文