-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
explain Available condition behavior in deployment concepts #39892
Closed
atiratree
wants to merge
1
commit into
kubernetes:main
from
atiratree:concepts.deployments-available-condition
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1027,8 +1027,23 @@ Conditions: | |
Progressing True NewReplicaSetAvailable | ||
``` | ||
|
||
`type: Available` with `status: "True"` means that your Deployment has minimum availability. Minimum availability is dictated | ||
by the parameters specified in the deployment strategy. `type: Progressing` with `status: "True"` means that your Deployment | ||
`type: Available` with `status: "True"` means that your Deployment is healthy and has a minimum availability (`.status.availableReplicas` is at least equal to `.spec.replicas - maxUnavailable`). | ||
`maxUnavailable` is computed according to the deployment strategy: | ||
- For the `RollingUpdate` strategy, it is a resolved value of `.spec.strategy.rollingUpdate.maxUnavailable`. | ||
- For the `Recreate` strategy, it is always equal to 100% of the replicas that we allow to be down, so that new rollouts can proceed. | ||
|
||
This condition should always have `status: "True"` in day-to-day operations; during and also after a rollout is completed. | ||
The condition will become `status: "False"` if there is an abnormal amount of disrupted pods (higher than a resolved value of `maxUnavailable`). | ||
|
||
{{< note >}} | ||
The `Available` condition is designed to support rollouts first. If `maxUnavailable` is equal to `.spec.replicas`, | ||
then this condition will never become `status: "False"`, even if no pods are running. | ||
In this case you should check `.status.availableReplicas` to be sure that at least 1 pod is present. | ||
It is recommended to have the number of `.spec.replicas` higher than `maxUnavailable`, to have always some pods available during a rollout. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good description! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. I suppose we will wait with this PR until we are all satisfied with the changes in kubernetes/kubernetes#113228 |
||
{{< /note >}} | ||
|
||
|
||
`type: Progressing` with `status: "True"` means that your Deployment | ||
is either in the middle of a rollout and it is progressing or that it has successfully completed its progress and the minimum | ||
required new replicas are available (see the Reason of the condition for the particulars - in our case | ||
`reason: NewReplicaSetAvailable` means that the Deployment is complete). | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This counts with a change proposed in kubernetes/kubernetes#113228. Currently it is 0.