@@ -260,6 +260,38 @@ problems, the kubelet resets the restart backoff timer for that container.
260
260
[ Sidecar containers and Pod lifecycle] ( /docs/concepts/workloads/pods/sidecar-containers/#sidecar-containers-and-pod-lifecycle )
261
261
explains the behaviour of ` init containers ` when specify ` restartpolicy ` field on it.
262
262
263
+ ### Configurable container restart delay
264
+
265
+ {{< feature-state feature_gate_name="KubeletCrashLoopBackOffMax" >}}
266
+
267
+ With the alpha feature gate ` KubeletCrashLoopBackOffMax ` enabled, you can
268
+ reconfigure the maximum delay between container start retries from the default
269
+ of 300s (5 minutes). This configuration is set per node using kubelet
270
+ configuration. In your [ kubelet configuration] ( /docs/tasks/administer-cluster/kubelet-config-file/ ) ,
271
+ under ` crashLoopBackOff ` set the ` maxContainerRestartPeriod ` field between
272
+ ` "1s" ` and ` "300s" ` . As described above in [ Container restart
273
+ policy] ( #restart-policy ) , delays on that node will still start at 10s and
274
+ increase exponentially by 2x each restart, but will now be capped at your
275
+ configured maximum. If the ` maxContainerRestartPeriod ` you configure is less
276
+ than the default initial value of 10s, the initial delay will instead be set to
277
+ the configured maximum.
278
+
279
+ See the following kubelet configuration examples:
280
+
281
+ ``` yaml
282
+ # container restart delays will start at 10s, increasing
283
+ # 2x each time they are restarted, to a maximum of 100s
284
+ kind : KubeletConfiguration
285
+ crashLoopBackOff :
286
+ maxContainerRestartPeriod : " 100s"
287
+ ` ` `
288
+
289
+ ` ` ` yaml
290
+ # delays between container restarts will always be 2s
291
+ kind : KubeletConfiguration
292
+ crashLoopBackOff :
293
+ maxContainerRestartPeriod : " 2s"
294
+ ` ` `
263
295
264
296
## Pod conditions
265
297
0 commit comments