Does readinessProbe keep pinging the url

4/18/2019

I am using readinessprobe for rolling updates. It works fine. But even after pods comes up. It keeps pinging healthz even after pod is running. I was assuming it will stop pinging when pods are up and running. Is it right?

specs:
   containers:
   - name: ready
     readinessProbe:
    httpGet:
      path: /healthz
      port: 80
-- Hacker
kubernetes
readinessprobe

2 Answers

4/18/2019

The kubelet will continue to run this check every 10 second which is default value. You can customize it according to your need.

It's important data for kubelet to understand if the Container is healthy or not. if it is not healthy it will try to restart it. therefore, its a continuous process. that's how we try to achieve application availability

periodSeconds: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

For further detail configure-probes

-- Suresh Vishnoi
Source: StackOverflow

4/18/2019

readinessProbe and livenessProbe will continue to do the check depends on the periodSeconds you have set or default value which is 10 seconds.

readinessProbe and livenessProbe do the exact same thing. The difference is the actions to be performed in case of failure.

readinessProbe will shut the communication down with the service in case of failure - so that service does not send any request to the Pod.

livenessProbe will restart the Pod in case of failure.

-- vins
Source: StackOverflow