0

My understanding is that after waiting for 45 seconds, Kubernetes is going to hit /heartbeat and wait for the response for 5 seconds. If it doesn't get the response, it is going to try 5 times(every 60 seconds). After 5x60seconds=5mins has elapsed, is Kubernetes going to keep doing the readiness check? If the service comes up after 6 mins, Is this pod going to be marked as ready? Second question, does it keep using failureThreshold and other readiness settings?

readinessProbe:
  httpGet:
    path: /heartbeat
    port: 8080
  initialDelaySeconds: 45
  timeoutSeconds: 5
  periodSeconds: 60
  failureThreshold: 5
livenessProbe:
  httpGet:
    path: /summary
    port: 8080
  initialDelaySeconds: 180
  timeoutSeconds: 1
  periodSeconds: 60
  failureThreshold: 5

1 Answer 1

1

In general it's correct:

  • readines probe will be initiated after: initialDelaySeconds: 45 # (delay) Number of seconds after the container has started before liveness or readiness probes are initiated.

  • periodSeconds: 60 # (How often in seconds) to perform the probes. Default to 10 seconds. Minimum value is 1.

  • timeoutSeconds: 5 # (time to response) Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1,

  • failureThreshold: 5 # (how many attempts will do) before giving up) In case of readiness probe the Pod will be marked Unready. Defaults to 3. Minimum value is 1,

When failureThreshold for livenes probe will be reached - kubelet will automatically perform the correct action in accordance with the Pod’s restartPolicy,

Once the failureThreshold for readinesprobe will be raeched the Pod will be marked as Unready. ( Defaults to 3. Minimum value is 1.).

As per documentation:

  1. When a Pod is not ready, it is removed from Service load balancers.
  2. Note: Readiness probes runs on the container during its whole lifecycle.

resources:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .