1

I have implemented liveness probe in my kubernetes deployment file. as of now it attempts restart infinite number of times. Is there a way to limit this number of restart attempts?

David Maze
  • 130,717
  • 29
  • 175
  • 215
Aman Deep
  • 51
  • 6
  • 1
    There is an option restartPolicy: Never to not restart Pod. As I know there aren't other options for liveness/readiness probes. You can check every option by issuing kubectl explain pod --recursive | less – Telinov Dmitri Dec 30 '21 at 14:04
  • After the first couple of restarts there will be a delay between them (if you see a pod in CrashLoopBackOff state, Kubernetes is waiting for a while before restarting it again) but I believe it will keep retrying forever. – David Maze Dec 30 '21 at 18:16

0 Answers0