-4

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. 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?

Malathi
  • 2,119
  • 15
  • 40
  • 1
    please post more information into your question, like the pod template, logs, etc. Using a similiar question to illustrate yours is not enough – Daniel Marques Apr 12 '21 at 19:00
  • Thanks to follow this link : [Readiness probe failed: timeout: failed to connect service “:8080” within 1s](https://stackoverflow.com/questions/63060336/readiness-probe-failed-timeout-failed-to-connect-service-8080-within-1s) he can help you to resolve the issue. – rassakra Apr 12 '21 at 21:00
  • i deployed the same microservices, from the online boutique by Google demo app https://github.com/newrelic-forks/microservices-demo . It is the recommendaτionservice deployment that has the problem. – christinaMaria Apr 12 '21 at 21:23
  • livenessProbe: exec: command: - /bin/grpc_health_probe - '-addr=:8080' timeoutSeconds: 10 periodSeconds: 5 successThreshold: 1 failureThreshold: 3 – christinaMaria Apr 12 '21 at 21:38

1 Answers1

2

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