-
Notifications
You must be signed in to change notification settings - Fork 39k
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
readinessProbe not failing if command is not installed #125339
Comments
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:
Please see the group list for a listing of the SIGs, working groups, and committees available. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
I think that is expected. You are piping the output to awk and it returns status code 0 regardless of the failure in the previous command, readinessProbe uses the status == 0 to consider the command a success. If you want it to fail regardless of the pipe operation you can update your command with |
/kind support |
Indeed. I was expecting that the status return wouldn't be zero, actually. Closing the issue, it was a misunderstanding from my side. |
What happened?
I have the following readinessProbe in my .yaml file:
The pod only has one container, and this container doesn't have
curl
installed. Still, the readinessProbe is making the pod as Ready.I then manually entered in the container, and installed
curl
by hand. 1 second after that, the POD was marked as not ready.If I don't manually install
curl
, and I run the same command, I got an error, as curl is not installed.What did you expect to happen?
The POD should not be marked as ready.
How can we reproduce it (as minimally and precisely as possible)?
I edited my yaml to be reproducible and reach to the same issue.
If I run this, I still can see that the pod is marked as Ready, even curl is not installed.
Anything else we need to know?
No response
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: