Reputation: 323
I have Deployment
that runs 5 pods.
I want to restart all pods each 5min.
Currently I'm doing it with python scritpt that is running kubectl get po
and checks AGE, if the AGE bigger than 5 min it deletes the pod.
Is there another way to achieve that?
Upvotes: 0
Views: 141
Reputation: 31
You could do a liveness check to achieve this, but why would you do it? Deployment is for LongRunning Tasks.
A liveness check will reschedule a pod if its not true (gives a other exit code than 0)
For more Info here:
Upvotes: 1