New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readiness probe keeps running when the pod is ready #37450
Comments
If I am reading the source code (https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/prober/worker.go) correctly, both issues are still present in master. There isn't any special case to stop readiness probe when the success threshold is hit, and the tickers' first tick is not immediate but respect the configured delay (the periodSeconds in our case) |
I re-read the doc and it's actually the expected behaviour so closing it. |
I could not find where in the doc this is expected; https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes I was also expecting the behaviour you mentioned in your original issue. That is what I understood from the name (and documentation) of the probes. Am I also mistaken? |
readinessProbe and livenessProbe all need to keep running . livenessProbe check the container is live or dead if dead restart the container. But it can't tell the service if the pod is ok to serve traffic. The readinessProbe is tell the service if the pod is ok to serve traffic. if it not ok,the pod ip will delete from service endpoints, so It needs to keep running too. |
Thanks for clarifying. After some tests I was able to confirm that behaviour. The part of the documentation that mislead me was;
since it ends by "during startup". But this is only one common example. |
Kubernetes version (use
kubectl version
): v1.2.0-36Environment:
What happened:
I am using an OpenShift 3.2.0.44 platform (which is running Kubernetes master 1.2.0-36-g4a3f9c5).
On this platform I launched a POD with a single container, which has a readiness probe. My issue is that when the container is determined as being ready, I can see the process of the probe spawning regularly (according to the periodSeconds value)
Note: it seems that there is another issue with periodSeconds: I tried to set the following readiness probe and have a warning saying that my container didn't pass its readiness check. Considering the executed command, it looks like the first check will be spawned at least 3600 seconds after the creation of the container
What you expected to happen:
Once the pod is determined ready I am not expecting the readiness probe to keep being spawned (which eats up resources).
How to reproduce it (as minimally and precisely as possible):
Adds this readiness probe and looks at the /tmp/readiness file in the pod:
You will see an entry appended to the file every second.
Anything else do we need to know:
I apologize if it has already been reported or fixed but I didn't see anything related in the changelog or in the issues.
The text was updated successfully, but these errors were encountered: