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?
Asked
Active
Viewed 650 times
1
-
1There 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