What is the probe ?
Probe is health check of the running pods for certain purposes, it means if the check is failed, then specific action is conducted to the pods. Such as restarting the pods and blocking external accesses to the pods.
There are 3 type probes at the moment. startup, liveness and readiness probes. startup probe is designed for slow starting containers, if it’s failed then the pod is restarted and it does not allow to start liveness and readiness probes until it’s succeeded.
Liveness probe is the same with startup probes, it’s just different coverage period on the pod lifecycle. It’s applied after startup Probe is successful, but if there is no startup probe, then it can start as soon as pod is running.
startup and liveness probes can specify just only “1” at the successThreshold , but readiness probe can use other value.
The above flow chart shows all probes relationship simply.
How to configure the probes ?
The configuration items are as follows, refer Configure Probes for more details.
initialDelaySeconds(default: 0, min: 0): number of seconds until initialize the first probe check.
periodSeconds(default: 10, min: 1): number of seconds for interval to execute the check.
timeoutSeconds(default: 1, min: 1): number of seconds for the executed check timeout.
successThreshold(default: 1, min: 1): minimum consecutive successes for successful evaluation. startup and liveness probes must be 1.
failureThreshold(default: 3, min: 1): consecutive failures until the check is evaluated as fail.
The configuration sample is here.
Thank you for reading.