kubernetes: liveness or readiness probes timeout does not work
What happened?
When executing livenessProbe exec command, timeoutSeconds does not work. timeoutSeconds: 5 periodSeconds: 30 exec command: /opt/entrypoint.sh healthcheck ,healthcheck will request a url without timeout. When this URL does not respond, a liveness request is received approximately every 2 minutes.
What did you expect to happen?
When this URL does not respond, liveness request timed out after 5 seconds.
How can we reproduce it (as minimally and precisely as possible)?
Maybe sleep 120s in command, timeoutSeconds: 5, periodSeconds: 30
Anything else we need to know?
livenessProbe config:
livenessProbe:
exec:
command:
- /opt/entrypoint.sh
- healthcheck
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 12
readinessProbe:
exec:
command:
- /opt/entrypoint.sh
- healthcheck
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 12
Kubernetes version
Server Version: version.Info{Major:"1", Minor:"29+", GitVersion:"v1.29.8-eks-a737599", GitCommit:"3277d87d88d0bf66b6368ce57e49b2f2aab01b0d", GitTreeState:"clean", BuildDate:"2024-08-26T21:27:41Z", GoVersion:"go1.22.5", Compiler:"gc", Platform:"linux/amd64"}
Cloud provider
AWS eks
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, …) and versions (if applicable)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (10 by maintainers)
Can you use
HTTPprobe? Or you can reduceruntimeRequestTimeout@MrYHM