Home > Software design >  "kubectl describe pod" does not report proper url of liveness probe
"kubectl describe pod" does not report proper url of liveness probe

Time:10-03

Below is the report for liveness & readiness after running kubectl -n mynamespace describe pod pod1:

Liveness:   http-get http://:8080/a/b/c/.well-known/heartbeat delay=3s timeout=3s period=10s #success=1 #failure=3
Readiness:  http-get http://:8080/a/b/c/.well-known/heartbeat delay=3s timeout=3s period=10s #success=1 #failure=3

  1. Is this the valid(working) url? http://:80/

  2. What does #success=1 #failure=3 mean?

CodePudding user response:

The results are completely right:

  • http://:8080 indicates that it will try an http-get in port 8080 inside your pod
  • #success=1 indicates a success threshold of 1 (the default), so the first time it gets an answer it will mark the pod as live or ready
  • #failure=3 indicates a failure threshold of 3 (the default again), so the third time the call fails will mark it unready or try to restart it.

See the official docs: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes

You may try to execute this command to see how the probes are configured:

kubectl -n mynamespace get pod pod1 -o yaml
  • Related