While deploying microservices on Kubernetes with minikube I faced the problem of Liveness probe failure. Based on this answer I changed the timeoutSeconds of liveness probe from 1 to 10, but the problem isn't fixed. https://stackoverflow.com/questions/63060336/readiness-probe-failed-timeout-failed-to-connect-service-8080-within-1s
The error says,
Liveness probe failed: timeout: failed to connect service ":8080" within 1s
Back-off restarting failed container.
What else could i do to solve this?
i fixed it by increasing timeout and adding startupProbe:
readinessProbe:
initialDelaySeconds: 5
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
periodSeconds: 5
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe:
initialDelaySeconds: 15
#timeoutSeconds: 3
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
startupProbe:
exec:
command: [ "/bin/grpc_health_probe", "-addr=:8080" ]
failureThreshold: 30
periodSeconds: 10