Skip to content

Commit cf2d2b7

Browse files
authored
Pod lifecycle edge-cases for Recreate strategy
Document Pod lifecycle behavior edge-case when using a Recreate strategy. This should document the "unexpected" behavior discussed in kubernetes/kubernetes#58814
1 parent 7bf9754 commit cf2d2b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,15 @@ the default value.
10811081
10821082
All existing Pods are killed before new ones are created when `.spec.strategy.type==Recreate`.
10831083
1084+
{{< note >}}
1085+
This will only guarantee Pod termination previous to creation for upgrades. If you upgrade a Deployment, all Pods
1086+
of the old revision will be terminated immediately. Successful removal is awaited before any Pod of the new
1087+
revision is created. If you manually delete a Pod, the lifecycle is controlled by the ReplicaSet and the
1088+
replacement will be created immediately (even if the old Pod is still in a Terminating state). If you need an
1089+
"at most" guarantee for your Pods, you should consider using a
1090+
[StatefulSet](/docs/concepts/workloads/controllers/statefulset/).
1091+
{{< /note >}}
1092+
10841093
#### Rolling Update Deployment
10851094
10861095
The Deployment updates Pods in a rolling update

0 commit comments

Comments
 (0)