参数
| 参数 | 默认 | 含义 |
|---|---|---|
| initialDelaySeconds | 0 | 容器启动后多久开始探测 |
| periodSeconds | 10 | 探测周期 |
| timeoutSeconds | 1 | 单次探测超时 |
| successThreshold | 1 | 失败后连续成功几次算恢复(liveness 只能为 1) |
| failureThreshold | 3 | 连续失败几次触发动作 |
计算示例
计算示例
最坏发现时间 ≈ failureThreshold × (periodSeconds + timeoutSeconds)
例:3 × (10+2) = 36 秒后重启;对延迟敏感的服务可缩短周期