readinessProbe 是否继续 ping url

Does readinessProbe keep pinging the url

我正在使用 readinessprobe 进行滚动更新。它工作正常。但即使在 pods 出现之后。即使在 pod 为 运行 后,它仍会继续 ping healthz。我假设它会在 pods 和 运行 启动时停止 ping。对吗?

specs:
   containers:
   - name: ready
     readinessProbe:
    httpGet:
      path: /healthz
      port: 80

kubelet 将继续 运行 每 10 秒检查一次,这是 默认值 。您可以根据需要进行定制。

这是 kubelet 了解 Container 是否健康的重要数据。如果它不健康,它将尝试重新启动它。因此,这是一个连续的过程。这就是我们努力实现 应用程序可用性

的方式

periodSeconds: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

更多详情 configure-probes

readinessProbelivenessProbe 将继续进行检查,具体取决于您设置的 periodSeconds 或默认值 10 秒。

readinessProbelivenessProbe 做完全相同的事情。区别在于失败时要执行的操作。

readinessProbe 将在出现故障时关闭与服务的通信 - 这样服务就不会向 Pod 发送任何请求。

livenessProbe 将在失败时重启 Pod。