Merge pull request #49896 from atiratree/pod-replacement-policy-docs

[KEP-3973]: document .status.terminatingReplicas enabled by DeploymentPodReplacementPolicy feature
pull/49897/head
Kubernetes Prow Robot 2025-03-26 19:08:39 -07:00 committed by GitHub
commit 0fe29ac3d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 39 additions and 0 deletions

View File

@ -1327,6 +1327,19 @@ created Pod should be ready without any of its containers crashing, for it to be
This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when
a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
### Terminating Pods
{{< feature-state feature_gate_name="DeploymentPodReplacementPolicy" >}}
You can enable this feature it by setting the `DeploymentPodReplacementPolicy`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
on the [API server](/docs/reference/command-line-tools-reference/kube-apiserver/)
and on the [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/)
Pods that become terminating due to deletion or scale down may take a long time to terminate, and may consume
additional resources during that period. As a result, the total number of all pods can temporarily exceed
`.spec.replicas`. Terminating pods can be tracked using the `.status.terminatingReplicas` field of the Deployment.
### Revision History Limit
A Deployment's revision history is stored in the ReplicaSets it controls.

View File

@ -320,6 +320,19 @@ To update Pods to a new spec in a controlled way, use a
[Deployment](/docs/concepts/workloads/controllers/deployment/#creating-a-deployment), as
ReplicaSets do not support a rolling update directly.
### Terminating Pods
{{< feature-state feature_gate_name="DeploymentPodReplacementPolicy" >}}
You can enable this feature it by setting the `DeploymentPodReplacementPolicy`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
on the [API server](/docs/reference/command-line-tools-reference/kube-apiserver/)
and on the [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/)
Pods that become terminating due to deletion or scale down may take a long time to terminate, and may consume
additional resources during that period. As a result, the total number of all pods can temporarily exceed
`.spec.replicas`. Terminating pods can be tracked using the `.status.terminatingReplicas` field of the ReplicaSet.
### Isolating Pods from a ReplicaSet
You can remove Pods from a ReplicaSet by changing their labels. This technique may be used to remove Pods

View File

@ -0,0 +1,13 @@
---
title: DeploymentPodReplacementPolicy
content_type: feature_gate
_build:
list: never
render: false
stages:
- stage: alpha
defaultValue: false
fromVersion: "1.33"
---
Enables a new status field `.status.terminatingReplicas` in Deployments and ReplicaSets to allow tracking of terminating pods.