首页/云/Kubernetes 速查/tolerationSeconds 与驱逐宽限
调度与资源52 条

tolerationSeconds 与驱逐宽限

容忍可携带 tolerationSeconds:节点打上 NoExecute 污点后,Pod 会保留指定秒数再被驱逐,为优雅下线留时间。

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

宽限 300 秒

宽限 300 秒
tolerations:
  - key: node.kubernetes.io/unreachable
    operator: Exists
    effect: NoExecute
    tolerationSeconds: 300
不写 tolerationSeconds 表示无限容忍;控制器给 not-ready/unreachable 的默认容忍通常是 300 秒。

易错点

  • 无限容忍 unreachable:节点失联后 Pod 长期挂着,副本数表面正常但流量已进不来
  • 把宽限期调得太短可加速重调度,但有状态服务可能出现双写,需要评估

数据来源与参考

  • Kubernetes 官方文档 · Tolerations(tolerationSeconds)
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌