Pod Health Indicator

Kubernetes 运行状况指标在 Spring Boot 应用程序中使用 HealthIndicator,以公开有关应用程序运行状况的信息,包括 Pod 名称、IP 地址、命名空间、服务帐户、节点名称和 IP 地址。该指标特别适合作为就绪性探测使用,并且可以通过禁用 management.health.kubernetes.enabled 设置来禁用。

Spring Boot 使用 HealthIndicator 来说明应用程序的健康状况信息。这使得它非常适合向用户显示与健康相关的信。因此,非常适合用作 readiness probes

Kubernetes 运行状况指标(作为核心模块的一部分)公开了以下信息:

  • Pod 名称、IP 地址、命名空间、服务帐户、节点名称及其 IP 地址

  • 用于指示 Spring Boot 应用程序是 Kubernetes 内部的还是外部的标志

您可以通过在 application.[properties | yaml] 中将 management.health.kubernetes.enabled 设置为 false 来禁用此 HealthContributor