Skip to content

Commit a9286d5

Browse files
committed
Docs for feature behind ReduceDefaultCrashLoopBackoffDecay feature gate
Signed-off-by: Laura Lorenz <[email protected]>
1 parent 2c5cb62 commit a9286d5

File tree

2 files changed

+44
-8
lines changed

2 files changed

+44
-8
lines changed

content/en/docs/concepts/workloads/pods/pod-lifecycle.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,21 +261,35 @@ problems, the kubelet resets the restart backoff timer for that container.
261261
[Sidecar containers and Pod lifecycle](/docs/concepts/workloads/pods/sidecar-containers/#sidecar-containers-and-pod-lifecycle)
262262
explains the behaviour of `init containers` when specify `restartpolicy` field on it.
263263

264+
### Reduced container restart delay
265+
266+
{{< feature-state
267+
feature_gate_name="ReduceDefaultCrashLoopBackOffDecay" >}}
268+
269+
With the alpha feature gate `ReduceDefaultCrashLoopBackOffDecay` enabled,
270+
container start retries across your cluster will be reduced to begin at 1s
271+
(instead of 10s) and increase exponentially by 2x each restart until a maximum
272+
delay of 60s (instead of 300s which is 5 minutes).
273+
274+
If you use this feature along with the alpha feature
275+
`KubeletCrashLoopBackOffMax` (described below), individual nodes may have
276+
different maximum delays.
277+
264278
### Configurable container restart delay
265279

266280
{{< feature-state feature_gate_name="KubeletCrashLoopBackOffMax" >}}
267281

268282
With the alpha feature gate `KubeletCrashLoopBackOffMax` enabled, you can
269283
reconfigure the maximum delay between container start retries from the default
270284
of 300s (5 minutes). This configuration is set per node using kubelet
271-
configuration. In your [kubelet configuration](/docs/tasks/administer-cluster/kubelet-config-file/),
272-
under `crashLoopBackOff` set the `maxContainerRestartPeriod` field between
273-
`"1s"` and `"300s"`. As described above in [Container restart
274-
policy](#restart-policy), delays on that node will still start at 10s and
275-
increase exponentially by 2x each restart, but will now be capped at your
276-
configured maximum. If the `maxContainerRestartPeriod` you configure is less
277-
than the default initial value of 10s, the initial delay will instead be set to
278-
the configured maximum.
285+
configuration. In your [kubelet
286+
configuration](/docs/tasks/administer-cluster/kubelet-config-file/), under
287+
`crashLoopBackOff` set the `maxContainerRestartPeriod` field between `"1s"` and
288+
`"300s"`. As described above in [Container restart policy](#restart-policy),
289+
delays on that node will still start at 10s and increase exponentially by 2x
290+
each restart, but will now be capped at your configured maximum. If the
291+
`maxContainerRestartPeriod` you configure is less than the default initial value
292+
of 10s, the initial delay will instead be set to the configured maximum.
279293

280294
See the following kubelet configuration examples:
281295

@@ -294,6 +308,13 @@ crashLoopBackOff:
294308
maxContainerRestartPeriod: "2s"
295309
```
296310
311+
If you use this feature along with the alpha feature
312+
`ReduceDefaultCrashLoopBackOffDecay` (described above), your cluster defaults
313+
for initial backoff and maximum backoff will no longer be 10s and 300s, but 1s
314+
and 60s. Per node configuration takes precedence over the defaults set by
315+
`ReduceDefaultCrashLoopBackOffDecay`, even if this would result in a node having
316+
a longer maximum backoff than other nodes in the cluster.
317+
297318
## Pod conditions
298319

299320
A Pod has a PodStatus, which has an array of
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: ReduceDefaultCrashLoopBackOffDecay
3+
content_type: feature_gate
4+
_build:
5+
list: never
6+
render: false
7+
8+
stages:
9+
- stage: alpha
10+
defaultValue: false
11+
fromVersion: "1.33"
12+
---
13+
Enabled reduction of both the initial delay and the maximum delay accrued
14+
between container restarts for a node for containers in `CrashLoopBackOff`
15+
across the cluster to `1s` initial delay and `60s` maximum delay.

0 commit comments

Comments
 (0)