首页/云/Kubernetes 速查/探针参数速查
本包目录(307 条)
kubectl 基础56 条工作负载36 条网络与服务55 条配置与存储54 条
调度与资源52 条
集群运维与排障54 条

探针参数速查

各参数决定探针节奏与灵敏度:最坏发现时间约等于 failureThreshold ×(periodSeconds + timeoutSeconds)。

Kubernetes 速查云更新于 2026-10-12

参数

参数默认含义
initialDelaySeconds0容器启动后多久开始探测
periodSeconds10探测周期
timeoutSeconds1单次探测超时
successThreshold1失败后连续成功几次算恢复(liveness 只能为 1)
failureThreshold3连续失败几次触发动作

计算示例

计算示例
最坏发现时间 ≈ failureThreshold × (periodSeconds + timeoutSeconds)
例:3 × (10+2) = 36 秒后重启;对延迟敏感的服务可缩短周期

易错点

  • timeoutSeconds 大于 periodSeconds:一轮未结束下一轮又开始,时间线难以解读
  • successThreshold 大于 1 时要核算总恢复时间,避免摘流时间过长

数据来源与参考

  • Kubernetes 官方文档 · 配置探针
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌