Kubernetes 健康检测完全指南
重启策略 策略 说明 适用对象 Always 总是重启 Deployment/RS(持续运行) OnFailure 失败时重启 Job/CronJob Never 从不重启 Job/CronJob 重启延迟: 10s → 20s → 40s → 80s → 160s → 300s(最大) 三种探针Startup Probe(启动探针)作用: 判断容器是否已启动 12345678startupProbe: httpGet: path: /doc.html port: 40017 initialDelaySeconds: 10 failureThreshold: 10 periodSeconds: 5# 最多50秒启动时间(10次×5秒) Liveness Probe(存活探针)作用: 检查容器是否需要重启(失败则杀死重启) 123456livenessProbe: httpGet: path: /doc.html port: 40017 failureThreshold: 1 periodS...
