Skip to content

Commit

Permalink
Merge pull request #49854 from adriananeci/enhance_revisionHistoryLimit
Browse files Browse the repository at this point in the history
Add note about deployment cleanup policy
  • Loading branch information
k8s-ci-robot authored Feb 21, 2025
2 parents 0b64484 + faaae90 commit 47d2a6d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions content/en/docs/concepts/workloads/controllers/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,16 @@ Explicitly setting this field to 0, will result in cleaning up all the history o
thus that Deployment will not be able to roll back.
{{< /note >}}

The cleanup only starts **after** a Deployment reaches a
[complete state](/docs/concepts/workloads/controllers/deployment/#complete-deployment).
If you set `.spec.revisionHistoryLimit` to 0, any rollout nonetheless triggers creation of a new
ReplicaSet before Kubernetes removes the old one.

Even with a non-zero revision history limit, you can have more ReplicaSets than the limit
you configure. For example, if pods are crash looping, and there are multiple rolling updates
events triggered over time, you might end up with more ReplicaSets than the
`.spec.revisionHistoryLimit` because the Deployment never reaches a complete state.

## Canary Deployment

If you want to roll out releases to a subset of users or servers using the Deployment, you
Expand Down

0 comments on commit 47d2a6d

Please # to comment.