Skip to content

Commit 0fe29ac

Browse files
authored
Merge pull request #49896 from atiratree/pod-replacement-policy-docs
[KEP-3973]: document .status.terminatingReplicas enabled by DeploymentPodReplacementPolicy feature
2 parents e63cc33 + def6c59 commit 0fe29ac

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

content/en/docs/concepts/workloads/controllers/deployment.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,19 @@ created Pod should be ready without any of its containers crashing, for it to be
13271327
This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when
13281328
a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
13291329

1330+
### Terminating Pods
1331+
1332+
{{< feature-state feature_gate_name="DeploymentPodReplacementPolicy" >}}
1333+
1334+
You can enable this feature it by setting the `DeploymentPodReplacementPolicy`
1335+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
1336+
on the [API server](/docs/reference/command-line-tools-reference/kube-apiserver/)
1337+
and on the [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/)
1338+
1339+
Pods that become terminating due to deletion or scale down may take a long time to terminate, and may consume
1340+
additional resources during that period. As a result, the total number of all pods can temporarily exceed
1341+
`.spec.replicas`. Terminating pods can be tracked using the `.status.terminatingReplicas` field of the Deployment.
1342+
13301343
### Revision History Limit
13311344

13321345
A Deployment's revision history is stored in the ReplicaSets it controls.

content/en/docs/concepts/workloads/controllers/replicaset.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,19 @@ To update Pods to a new spec in a controlled way, use a
320320
[Deployment](/docs/concepts/workloads/controllers/deployment/#creating-a-deployment), as
321321
ReplicaSets do not support a rolling update directly.
322322

323+
### Terminating Pods
324+
325+
{{< feature-state feature_gate_name="DeploymentPodReplacementPolicy" >}}
326+
327+
You can enable this feature it by setting the `DeploymentPodReplacementPolicy`
328+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
329+
on the [API server](/docs/reference/command-line-tools-reference/kube-apiserver/)
330+
and on the [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/)
331+
332+
Pods that become terminating due to deletion or scale down may take a long time to terminate, and may consume
333+
additional resources during that period. As a result, the total number of all pods can temporarily exceed
334+
`.spec.replicas`. Terminating pods can be tracked using the `.status.terminatingReplicas` field of the ReplicaSet.
335+
323336
### Isolating Pods from a ReplicaSet
324337

325338
You can remove Pods from a ReplicaSet by changing their labels. This technique may be used to remove Pods
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: DeploymentPodReplacementPolicy
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+
Enables a new status field `.status.terminatingReplicas` in Deployments and ReplicaSets to allow tracking of terminating pods.

0 commit comments

Comments
 (0)