Skip to content

Commit 49f7b70

Browse files
authored
Merge pull request #25429 from jiazxjason/patch-22
Update zh trans safely-drain-node.md
2 parents a0cf6ca + 8ca648a commit 49f7b70

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

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

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,67 @@
11
---
2-
title: 确保 PodDisruptionBudget 的前提下安全地清空一个节点
2+
title: 安全地清空一个节点
33
content_type: task
4+
min-kubernetes-server-version: 1.5
5+
---
6+
<!--
47
---
5-
<!--
68
reviewers:
79
- davidopp
810
- mml
911
- foxish
1012
- kow3ns
11-
title: Safely Drain a Node while Respecting the PodDisruptionBudget
13+
title: Safely Drain a Node
1214
content_type: task
15+
min-kubernetes-server-version: 1.5
16+
---
1317
-->
1418

1519
<!-- overview -->
1620
<!--
1721
This page shows how to safely drain a node, respecting the PodDisruptionBudget you have defined.
1822
-->
19-
本页展示了如何在确保 PodDisruptionBudget 的前提下,安全地清空一个
20-
{{< glossary_tooltip text="节点" term_id="node" >}}。
23+
本页展示了如何在确保 PodDisruptionBudget 的前提下,安全地清空一个{{< glossary_tooltip text="节点" term_id="node" >}}。
2124

2225
## {{% heading "prerequisites" %}}
2326

2427
{{% version-check %}}
25-
2628
<!--
2729
This task assumes that you have met the following prerequisites:
2830
2931
* You are using Kubernetes release >= 1.5.
3032
* Either:
3133
1. You do not require your applications to be highly available during the
3234
node drain, or
33-
1. You have read about the [PodDisruptionBudget concept](/docs/concepts/workloads/pods/disruptions/)
35+
2. You have read about the [PodDisruptionBudget concept](/docs/concepts/workloads/pods/disruptions/)
3436
and [Configured PodDisruptionBudgets](/docs/tasks/run-application/configure-pdb/) for
3537
applications that need them.
3638
-->
37-
此任务假设您已经满足以下先决条件
39+
此任务假定你已经满足了以下先决条件
3840

3941
* 使用的 Kubernetes 版本 >= 1.5。
4042
* 以下两项,具备其一:
4143
1. 在节点清空期间,不要求应用程序具有高可用性
42-
1. 你已经了解了 [PodDisruptionBudget 的概念](/zh/docs/concepts/workloads/pods/disruptions/)
44+
2. 你已经了解了 [PodDisruptionBudget 的概念](/zh/docs/concepts/workloads/pods/disruptions/)
4345
并为需要它的应用程序[配置了 PodDisruptionBudget](/zh/docs/tasks/run-application/configure-pdb/)
4446

4547
<!-- steps -->
4648

49+
<!--
50+
## (Optional) Configure a disruption budget {#configure-poddisruptionbudget}
51+
52+
To endure that your workloads remain available during maintenance, you can
53+
configure a [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/).
54+
55+
If availability is important for any applications that run or could run on the node(s)
56+
that you are draining, [configure a PodDisruptionBudgets](/docs/tasks/run-application/configure-pdb/)
57+
first and the continue following this guide.
58+
-->
59+
## (可选) 配置干扰预算 {#configure-poddisruptionbudget}
60+
61+
为了确保你的负载在维护期间仍然可用,你可以配置一个 [PodDisruptionBudget](/zh/docs/concepts/workloads/pods/disruptions/)
62+
如果可用性对于正在清空的该节点上运行或可能在该节点上运行的任何应用程序很重要,
63+
首先 [配置一个 PodDisruptionBudgets](/zh/docs/tasks/run-application/configure-pdb/) 并继续遵循本指南。
64+
4765
<!--
4866
## Use `kubectl drain` to remove a node from service
4967
@@ -176,8 +194,7 @@ itself. To attempt an eviction (perhaps more REST-precisely, to attempt to
176194
[Kubernetes 语言客户端](/zh/docs/tasks/administer-cluster/access-cluster-api/#programmatic-access-to-the-api)
177195

178196
Pod 的 Eviction 子资源可以看作是一种策略控制的 DELETE 操作,作用于 Pod 本身。
179-
要尝试驱逐(更准确地说,尝试 *创建* 一个 Eviction),需要用 POST
180-
发出所尝试的操作。这里有一个例子:
197+
要尝试驱逐(更准确地说,尝试 *创建* 一个 Eviction),需要用 POST 发出所尝试的操作。这里有一个例子:
181198

182199
```json
183200
{
@@ -213,7 +230,7 @@ The API can respond in one of three ways:
213230
- If there is some kind of misconfiguration, like multiple budgets pointing at
214231
the same pod, you will get `500 Internal Server Error`.
215232
-->
216-
API可以通过以下三种方式之一进行响应
233+
API 可以通过以下三种方式之一进行响应
217234

218235
- 如果驱逐被授权,那么 Pod 将被删掉,并且你会收到 `200 OK`
219236
就像你向 Pod 的 URL 发送了 `DELETE` 请求一样。
@@ -229,7 +246,7 @@ For a given eviction request, there are two cases:
229246
- There is no budget that matches this pod. In this case, the server always
230247
returns `200 OK`.
231248
- There is at least one budget. In this case, any of the three above responses may
232-
apply.
249+
apply.
233250
-->
234251
对于一个给定的驱逐请求,有两种情况:
235252

@@ -272,9 +289,12 @@ Kubernetes 并没有具体说明在这种情况下应该采取什么行为,
272289

273290
## {{% heading "whatsnext" %}}
274291

292+
275293
<!--
276294
* Follow steps to protect your application by [configuring a Pod Disruption Budget](/docs/tasks/run-application/configure-pdb/).
277-
-->
295+
* Learn more about [maintenance on a node](/docs/tasks/administer-cluster/cluster-management/#maintenance-on-a-node).
296+
-->
278297
* 执行[配置 PDB](/zh/docs/tasks/run-application/configure-pdb/)中的各个步骤,
279298
保护你的应用
299+
* 进一步了解[节点维护](/zh/docs/tasks/administer-cluster/cluster-management/#maintenance-on-a-node)
280300

0 commit comments

Comments
 (0)