configuring kubernetes restart policy

12/12/2016

According to the docs -

Failed containers that are restarted by Kubelet, are restarted with an exponential back-off delay, the delay is in multiples of sync-frequency 0, 1x, 2x, 4x, 8x … capped at 5 minutes and is reset after 10 minutes of successful execution.

Is there any way to define a custom RestartPolicy? I want to minimize the back-off delay as much as possible and drop off the exponential behavior.

As far as I can find, you can't even configure the RestartPoilcy, let alone make a new one...

-- user1708860
kubernetes
kubernetes-health-check

1 Answer

12/12/2016

The backoff delay is not tunable because it could severely affects the reliability of kubelet. Imagine you have some pods that keep crashing on the node, kubelet will continuously restarting all those pods/containers with no break, consuming a lot of resources.

Why do you want to change the restart backoff delay?

-- Yu-Ju Hong
Source: StackOverflow