Skip to content

Commit 7829637

Browse files
authored
Merge pull request #50065 from lauralorenz/ReduceDefaultCrashLoopBackoffDecay-docs
KEP-4603: Docs for feature behind ReduceDefaultCrashLoopBackoffDecay feature gate
2 parents a368f55 + a9286d5 commit 7829637

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
@@ -262,21 +262,35 @@ problems, the kubelet resets the restart backoff timer for that container.
262262
[Sidecar containers and Pod lifecycle](/docs/concepts/workloads/pods/sidecar-containers/#sidecar-containers-and-pod-lifecycle)
263263
explains the behaviour of `init containers` when specify `restartpolicy` field on it.
264264

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

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

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

281295
See the following kubelet configuration examples:
282296

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

300321
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)