Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions content/en/docs/concepts/workloads/pods/pod-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,10 @@ To investigate the root cause of a `CrashLoopBackOff` issue, a user can:

When a container in your Pod stops, or experiences failure, Kubernetes can restart it.
A restart isn't always appropriate; for example,
{{< glossary_tooltip text="init containers" term_id="init-container" >}} run only once,
{{< glossary_tooltip text="init containers" term_id="init-container" >}} run only once (if successful),
during Pod startup.
<!-- TODO reword when ContainerRestartRules graduates -->
You can configure restarts as a policy that applies to all Pods, or using container-level configuration (for example: when you define a
{{< glossary_tooltip text="sidecar container" term_id="sidecar-container" >}}).
{{< glossary_tooltip text="sidecar container" term_id="sidecar-container" >}}) or define container-level override.

#### Container restarts and resilience {#container-restart-resilience}

Expand Down Expand Up @@ -286,13 +285,13 @@ explains the behaviour of `init containers` when specify `restartpolicy` field o
{{< feature-state
feature_gate_name="ContainerRestartRules" >}}

If your cluster has the feature gate `ContainerRestartRules` enabled, you can specify
If your cluster has the feature gate `ContainerRestartRules` enabled, you can specify
`restartPolicy` and `restartPolicyRules` on _individual containers_ to override the Pod
restart policy. Container restart policy and rules applies to {{< glossary_tooltip text="app containers" term_id="app-container" >}}
in the Pod and to regular [init containers](/docs/concepts/workloads/pods/init-containers/).

A Kubernetes-native [sidecar container](/docs/concepts/workloads/pods/sidecar-containers/)
has its container-level `restartPolicy` set to `Always`, and does not support `restartPolicyRules`.
has its container-level `restartPolicy` set to `Always`, and does not support `restartPolicyRules`.

The container restarts will follow the same exponential backoff as pod restart policy described above.
Supported container restart policies:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it'd be nice to swap these so that they are a description list.

Not required, but recommended; when features go enabled-by-default, we prefer the docs to be GA quality at that point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, see #52971

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ stages:
- stage: alpha
defaultValue: false
fromVersion: "1.34"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heya, this needs a tweak.

Suggested change
toVersion: "1.34"

- stage: beta
defaultValue: true
fromVersion: "1.35"
---
Enables the ability to configure container-level restart policy and restart rules.
See [Container Restart Policy and Rules](/docs/concepts/workloads/pods/pod-lifecycle/#container-restart-rules) for more details.