@@ -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 for_k8s_version="v1.32" state="alpha" >}}
266
+
267
+ With the alpha feature gate ` KubeletCrashLoopBackOffMax ` enabled, you can
268
+ reconfigure the maximum delay between container restarts from the default of
269
+ 300s (5 minutes). This configuration is set per node using kubelet
270
+ configuration. In your [ kubelet
271
+ configuration] ( https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ ) ,
272
+ set the ` CrashLoopBackOff.MaxContainerRestartPeriod ` field between ` "1s" ` and
273
+ ` "300s" ` . Delays on that node will still start at 10s and increase exponentially
274
+ by 2x each restart, until being capped at your configured maximum. If the
275
+ ` CrashLoopBackOff.MaxContainerRestartPeriod ` you configure is less than the
276
+ default initial value of 10s, the initial delay will instead be set to the
277
+ 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