Skip to content

Commit e6442db

Browse files
authored
Merge pull request #38510 from my-git9/zhsync/safely-drain-node
[zh-cn]sync administer-cluster/safely-drain-node.md
2 parents 7315ec8 + 93ff184 commit e6442db

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

content/zh-cn/docs/tasks/administer-cluster/safely-drain-node.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,21 @@ respect the `PodDisruptionBudget` you specify.
155155
For example, if you have a StatefulSet with three replicas and have
156156
set a PodDisruptionBudget for that set specifying `minAvailable: 2`,
157157
`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)
162163
replicas to fall below the specified budget are blocked.
163164
-->
164165
例如,如果你有一个三副本的 StatefulSet,
165166
并设置了一个 `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,
168169
因为 Kubernetes 会遵守 PodDisruptionBudget 并确保在任何时候只有一个 Pod 不可用
169170
(最多不可用 Pod 个数的计算方法:`replicas - minAvailable`)。
170-
任何会导致就绪副本数量低于指定预算的清空操作都将被阻止。
171+
任何会导致处于[健康(healthy)](/zh-cn/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod)
172+
状态的副本数量低于指定预算的清空操作都将被阻止。
171173

172174
<!--
173175
## The Eviction API

0 commit comments

Comments
 (0)