Why is my liveness probe failing even though my application pods are starting up?

0
14
Asked By CuriousCat42 On

I'm having trouble with my application's liveness probe. The pods seem to start correctly, as the logs indicate that the application is up and running on port 8091 within about ten seconds. However, despite setting a sufficient delay, I'm still seeing failures in the liveness probe. I'm not sure what the issue could be. Has anyone else experienced this or have any suggestions?

4 Answers

Answered By CodeWizard99 On

Another option to consider is implementing a startupProbe. This allows the liveness probe to skip checks until your application has fully started, which might solve your issue if the app needs more time to be ready.

Answered By LocalTester On

Have you tried testing your setup locally using a tool like Rancher before deploying to Kubernetes? Doing so can help pinpoint the problem much quicker.

Answered By TechieTommy On

First off, you might want to check the logic behind your liveness probe. Is it configured to check a specific path? For example, is it using `/health/live`? If possible, share your probe configuration. Also, try making a curl request from inside the pod to see if it's responding correctly.

Answered By DebuggingDude On

While you're trying to figure out the HTTP probe issue, you could switch to an exec command probe temporarily. For example, you can set it to touch a file like this:

```yaml
livenessProbe:
exec:
command:
- touch
- /tmp/healthy
```

This way, you can exec into the pod and diagnose the HTTP probe without worrying about it restarting constantly.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.