In some case URL probe (httpGet) is not the answer, So use liveness command probe instead.
livenessProbe:
exec:
command:
- /bin/sh
- -c
- curl --fail -o /dev/null -sS -m 2 http://127.0.0.1:10254/healthz
failureThreshold: 5
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
readinessProbe:
exec:
command:
- /bin/sh
- -c
- curl --fail -o /dev/null -sS -m 2 http://127.0.0.1:10254/healthz
failureThreshold: 5
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
Note: older curl may not support “ — fail” option
That’s all for today.