@@ -155,19 +155,21 @@ respect the `PodDisruptionBudget` you specify.
155
155
For example, if you have a StatefulSet with three replicas and have
156
156
set a PodDisruptionBudget for that set specifying `minAvailable: 2`,
157
157
`kubectl drain` only evicts a pod from the StatefulSet if all three
158
- replicas pods are ready; if then you issue multiple drain commands in
159
- parallel, Kubernetes respects the PodDisruptionBudget and ensure
160
- that only 1 (calculated as `replicas - minAvailable`) Pod is unavailable
161
- at any given time. Any drains that would cause the number of ready
158
+ replicas pods are [healthy](/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod);
159
+ if then you issue multiple drain commands in parallel,
160
+ Kubernetes respects the PodDisruptionBudget and ensure that
161
+ only 1 (calculated as `replicas - minAvailable`) Pod is unavailable
162
+ at any given time. Any drains that would cause the number of [healthy](/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod)
162
163
replicas to fall below the specified budget are blocked.
163
164
-->
164
165
例如,如果你有一个三副本的 StatefulSet,
165
166
并设置了一个 ` PodDisruptionBudget ` ,指定 ` minAvailable: 2 ` 。
166
- 如果所有的三个 Pod 均就绪,并且你并行地发出多个 drain 命令 ,
167
- 那么 ` kubectl drain ` 只会从 StatefulSet 中逐出一个 Pod,
167
+ 如果所有的三个 Pod 处于 [ 健康(healthy) ] ( /zh-cn/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod ) 状态 ,
168
+ 并且你并行地发出多个 drain 命令, 那么 ` kubectl drain ` 只会从 StatefulSet 中逐出一个 Pod,
168
169
因为 Kubernetes 会遵守 PodDisruptionBudget 并确保在任何时候只有一个 Pod 不可用
169
170
(最多不可用 Pod 个数的计算方法:` replicas - minAvailable ` )。
170
- 任何会导致就绪副本数量低于指定预算的清空操作都将被阻止。
171
+ 任何会导致处于[ 健康(healthy)] ( /zh-cn/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod )
172
+ 状态的副本数量低于指定预算的清空操作都将被阻止。
171
173
172
174
<!--
173
175
## The Eviction API
0 commit comments