1

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?

overexchange
  • 15,768
  • 30
  • 152
  • 347

1 Answers1

4

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
jmservera
  • 6,454
  • 2
  • 32
  • 45
  • why is there a "# in front of success and failure? The other values do not carry this prefix? Initially, I thought this was used to indicate that default values are being used but when I change the failure to say 5, I still have a # in front of failure so unsure if the # prefix has a specific meaning. – Manglu Jul 12 '22 at 10:43