Skip to content

Commit f0a0ab2

Browse files
authored
Merge pull request #48499 from lauralorenz/crashloopbackoff-docs
KEP-4602: Crashloopbackoff alpha docs PR
2 parents 69cce03 + 333e896 commit f0a0ab2

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

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

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

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+
```
263295
264296
## Pod conditions
265297
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: KubeletCrashLoopBackOffMax
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.32"
12+
---
13+
Enables support for configurable per-node backoff maximums for restarting
14+
containers in the CrashLoopBackOff state.

0 commit comments

Comments
 (0)