Pod Health Indicator

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

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

Spring Boot uses HealthIndicator to expose info about the health of an application. That makes it really useful for exposing health-related information to the user and makes it a good fit for use as readiness probes.

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

The Kubernetes health indicator (which is part of the core module) exposes the following info:

  • Pod name, IP address, namespace, service account, node name, and its IP address

  • A flag that indicates whether the Spring Boot application is internal or external to Kubernetes

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

You can disable this HealthContributor by setting management.health.kubernetes.enabled to false in application.[properties | yaml].