The kubelet uses startup probes to know when a container application has started. If such a probe is configured, liveness and readiness probes do not start until it succeeds, making sure those probes don’t interfere with the application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.
启动探针:即探测容器是否启动起来。然后才会启用就绪探针和存活探针。
使用场景:容器启动时间较长时,防止被就绪探针或存活探针(启动时长超过延迟探测时长)探测失败重启容器;通过提高启动探针探测频率,能够能及时的启动容器,而不是通过预估延迟探测时间。
启动探针探测时长:failureThreshold * periodSeconds。最长5min。
启动探针配置如下:
startupProbe:
failureThreshold: 30
httpGet:
path: /actuator/health
port: 8079
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1