Skip to content

Commit 14c4811

Browse files
authored
Merge pull request #33966 from Sea-n/zh-reviewer-tasks
[zh] Remove reviewer for tasks
2 parents 894a08c + 1dff006 commit 14c4811

File tree

5 files changed

+74
-89
lines changed

5 files changed

+74
-89
lines changed

content/zh/docs/tasks/administer-cluster/reserve-compute-resources.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
---
2-
reviewers:
3-
- vishh
4-
- derekwaynecarr
5-
- dashpole
62
title: 为系统守护进程预留计算资源
73
content_type: task
84
min-kubernetes-server-version: 1.8
@@ -28,15 +24,15 @@ node.
2824
2925
The `kubelet` exposes a feature named 'Node Allocatable' that helps to reserve
3026
compute resources for system daemons. Kubernetes recommends cluster
31-
administrators to configure `Node Allocatable` based on their workload density
27+
administrators to configure 'Node Allocatable' based on their workload density
3228
on each node.
3329
-->
3430
Kubernetes 的节点可以按照 `Capacity` 调度。默认情况下 pod 能够使用节点全部可用容量。
3531
这是个问题,因为节点自己通常运行了不少驱动 OS 和 Kubernetes 的系统守护进程。
3632
除非为这些系统守护进程留出资源,否则它们将与 pod 争夺资源并导致节点资源短缺问题。
3733

3834
`kubelet` 公开了一个名为 'Node Allocatable' 的特性,有助于为系统守护进程预留计算资源。
39-
Kubernetes 推荐集群管理员按照每个节点上的工作负载密度配置 `Node Allocatable`
35+
Kubernetes 推荐集群管理员按照每个节点上的工作负载密度配置 Node Allocatable
4036

4137
## {{% heading "prerequisites" %}}
4238

@@ -72,7 +68,7 @@ Resources can be reserved for two categories of system daemons in the `kubelet`.
7268

7369
Kubernetes 节点上的 'Allocatable' 被定义为 pod 可用计算资源量。
7470
调度器不会超额申请 'Allocatable'。
75-
目前支持 'CPU', 'memory' 和 'ephemeral-storage' 这几个参数。
71+
目前支持 'CPU''memory' 和 'ephemeral-storage' 这几个参数。
7672

7773
可分配的节点暴露为 API 中 `v1.Node` 对象的一部分,也是 CLI 中
7874
`kubectl describe node` 的一部分。
@@ -87,7 +83,7 @@ enable the new cgroup hierarchy via the `--cgroups-per-qos` flag. This flag is
8783
enabled by default. When enabled, the `kubelet` will parent all end-user pods
8884
under a cgroup hierarchy managed by the `kubelet`.
8985
-->
90-
### 启用 QoS 和 Pod 级别的 cgroups
86+
### 启用 QoS 和 Pod 级别的 cgroups {#enabling-qos-and-pod-level-cgroups}
9187

9288
为了恰当的在节点范围实施节点可分配约束,你必须通过 `--cgroups-per-qos`
9389
标志启用新的 cgroup 层次结构。这个标志是默认启用的。
@@ -110,10 +106,10 @@ transient slices for resources that are supported by that init system.
110106
Depending on the configuration of the associated container runtime,
111107
operators may have to choose a particular cgroup driver to ensure
112108
proper system behavior. For example, if operators use the `systemd`
113-
cgroup driver provided by the `docker` runtime, the `kubelet` must
109+
cgroup driver provided by the `containerd` runtime, the `kubelet` must
114110
be configured to use the `systemd` cgroup driver.
115111
-->
116-
### 配置 cgroup 驱动
112+
### 配置 cgroup 驱动 {#configuring-a-cgroup-driver}
117113

118114
`kubelet` 支持在主机上使用 cgroup 驱动操作 cgroup 层次结构。
119115
驱动通过 `--cgroup-driver` 标志配置。
@@ -127,7 +123,7 @@ be configured to use the `systemd` cgroup driver.
127123

128124
取决于相关容器运行时的配置,操作员可能需要选择一个特定的 cgroup 驱动
129125
来保证系统正常运行。
130-
例如,如果操作员使用 `docker` 运行时提供的 `systemd` cgroup 驱动时,
126+
例如,如果操作员使用 `containerd` 运行时提供的 `systemd` cgroup 驱动时,
131127
必须配置 `kubelet` 使用 `systemd` cgroup 驱动。
132128

133129
<!--
@@ -191,7 +187,6 @@ exist. Kubelet will fail if an invalid cgroup is specified.
191187
- **Kubelet Flag**: `--system-reserved=[cpu=100m][,][memory=100Mi][,][ephemeral-storage=1Gi][,][pid=1000]`
192188
- **Kubelet Flag**: `--system-reserved-cgroup=`
193189
194-
195190
`system-reserved` is meant to capture resource reservation for OS system daemons
196191
like `sshd`, `udev`, etc. `system-reserved` should reserve `memory` for the
197192
`kernel` too since `kernel` memory is not accounted to pods in Kubernetes at this time.
@@ -237,14 +232,15 @@ exist. `kubelet` will fail if an invalid cgroup is specified.
237232

238233
<!--
239234
### Explicitly Reserved CPU List
240-
241-
-**Kubelet Flag**: `--reserved-cpus=0-3`
242235
-->
243236
### 显式保留的 CPU 列表 {#explicitly-reserved-cpu-list}
244237

245238
{{< feature-state for_k8s_version="v1.17" state="stable" >}}
246239

247-
-**Kubelet 标志**: `--reserved-cpus=0-3`
240+
<!--
241+
**Kubelet Flag**: `--reserved-cpus=0-3`
242+
-->
243+
**Kubelet 标志**`--reserved-cpus=0-3`
248244

249245
<!--
250246
`reserved-cpus` is meant to define an explicit CPU set for OS system daemons and
@@ -283,7 +279,7 @@ cpuset 上,应使用 Kubernetes 之外的其他机制。
283279
<!--
284280
### Eviction Thresholds
285281
286-
- **Kubelet Flag**: `--eviction-hard=[memory.available<500Mi]`
282+
**Kubelet Flag**: `--eviction-hard=[memory.available<500Mi]`
287283
288284
Memory pressure at the node level leads to System OOMs which affects the entire
289285
node and all pods running on it. Nodes can go offline temporarily until memory
@@ -299,7 +295,7 @@ available for pods.
299295
-->
300296
### 驱逐阈值 {#eviction-Thresholds}
301297

302-
- **Kubelet 标志**: `--eviction-hard=[memory.available<500Mi]`
298+
**Kubelet 标志**`--eviction-hard=[memory.available<500Mi]`
303299

304300
节点级别的内存压力将导致系统内存不足,这将影响到整个节点及其上运行的所有 Pod。
305301
节点可以暂时离线直到内存已经回收为止。
@@ -314,7 +310,7 @@ available for pods.
314310
<!--
315311
### Enforcing Node Allocatable
316312
317-
-**Kubelet Flag**: `--enforce-node-allocatable=pods[,][system-reserved][,][kube-reserved]`
313+
**Kubelet Flag**: `--enforce-node-allocatable=pods[,][system-reserved][,][kube-reserved]`
318314
319315
The scheduler treats 'Allocatable' as the available `capacity` for pods.
320316
@@ -333,7 +329,7 @@ respectively.
333329
-->
334330
### 实施节点可分配约束 {#enforcing-node-allocatable}
335331

336-
-**Kubelet 标志**: `--enforce-node-allocatable=pods[,][system-reserved][,][kube-reserved]`
332+
**Kubelet 标志**`--enforce-node-allocatable=pods[,][system-reserved][,][kube-reserved]`
337333

338334
调度器将 'Allocatable' 视为 Pod 可用的 `capacity`(资源容量)。
339335

@@ -344,7 +340,7 @@ respectively.
344340
可通过设置 kubelet `--enforce-node-allocatable` 标志值为 `pods` 控制这个措施。
345341

346342
可选地,通过在同一标志中同时指定 `kube-reserved``system-reserved` 值,
347-
可以使 `kubelet` 强制实施 `kube-reserved``system-reserved`约束。
343+
可以使 `kubelet` 强制实施 `kube-reserved``system-reserved` 约束。
348344
请注意,要想执行 `kube-reserved` 或者 `system-reserved` 约束,
349345
需要对应设置 `--kube-reserved-cgroup` 或者 `--system-reserved-cgroup`
350346

@@ -355,7 +351,7 @@ System daemons are expected to be treated similar to
355351
[Guaranteed pods](/docs/tasks/configure-pod-container/quality-service-pod/#create-a-pod-that-gets-assigned-a-qos-class-of-guaranteed).
356352
System daemons can burst within their bounding control groups and this behavior needs
357353
to be managed as part of kubernetes deployments. For example, `kubelet` should
358-
have its own control group and share `Kube-reserved` resources with the
354+
have its own control group and share `kube-reserved` resources with the
359355
container runtime. However, Kubelet cannot burst and use up all available Node
360356
resources if `kube-reserved` is enforced.
361357
-->
@@ -366,7 +362,7 @@ resources if `kube-reserved` is enforced.
366362
一样对待。
367363
系统守护进程可以在与其对应的控制组中出现突发资源用量,这一行为要作为
368364
kubernetes 部署的一部分进行管理。
369-
例如,`kubelet` 应该有它自己的控制组并和容器运行时共享 `Kube-reserved` 资源。
365+
例如,`kubelet` 应该有它自己的控制组并和容器运行时共享 `kube-reserved` 资源。
370366
不过,如果执行了 `kube-reserved` 约束,则 kubelet 不可出现突发负载并用光
371367
节点的所有可用资源。
372368

@@ -391,7 +387,7 @@ ability to recover if any process in that group is oom-killed.
391387

392388
* 作为起步,可以先针对 `pods` 上执行 'Allocatable' 约束。
393389
* 一旦用于追踪系统守护进程的监控和告警的机制到位,可尝试基于用量估计的
394-
方式执行 `kube-reserved`策略。
390+
方式执行 `kube-reserved` 策略。
395391
* 随着时间推进,在绝对必要的时候可以执行 `system-reserved` 策略。
396392

397393
<!--
@@ -437,7 +433,7 @@ much CPU as they can, pods together cannot consume more than 14.5 CPUs.
437433
438434
If `kube-reserved` and/or `system-reserved` is not enforced and system daemons
439435
exceed their reservation, `kubelet` evicts pods whenever the overall node memory
440-
usage is higher than 31.5Gi or `storage` is greater than 90Gi
436+
usage is higher than 31.5Gi or `storage` is greater than 90Gi.
441437
-->
442438
在这个场景下,'Allocatable' 将会是 14.5 CPUs、28.5Gi 内存以及 `88Gi` 本地存储。
443439
调度器保证这个节点上的所有 Pod 的内存 `requests` 总量不超过 28.5Gi,
@@ -448,6 +444,6 @@ kubelet 将会驱逐它们。
448444
14.5 CPUs 的资源。
449445

450446
当没有执行 `kube-reserved` 和/或 `system-reserved` 策略且系统守护进程
451-
使用量超过其预留时,如果节点内存用量高于 31.5Gi 或`存储`大于 90Gi,
447+
使用量超过其预留时,如果节点内存用量高于 31.5Gi 或 `storage` 大于 90Gi,
452448
kubelet 将会驱逐 Pod。
453449

content/zh/docs/tasks/configure-pod-container/translate-compose-kubernetes.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
2-
reviewers:
3-
- cdrage
42
title: 将 Docker Compose 文件转换为 Kubernetes 资源
53
content_type: task
64
weight: 200
75
---
8-
96
<!--
7+
reviewers:
8+
- cdrage
109
title: Translate a Docker Compose File to Kubernetes Resources
1110
content_type: task
12-
weight: 170
11+
weight: 200
1312
-->
1413

1514
<!-- overview -->
@@ -36,7 +35,7 @@ More information can be found on the Kompose website at [http://kompose.io](http
3635
3736
We have multiple ways to install Kompose. Our preferred method is downloading the binary from the latest GitHub release.
3837
-->
39-
## 安装 Kompose
38+
## 安装 Kompose {#install-kompose}
4039

4140
我们有很多种方式安装 Kompose。首选方式是从最新的 GitHub 发布页面下载二进制文件。
4241

@@ -132,7 +131,7 @@ brew install kompose
132131
<!--
133132
## Use Kompose
134133
-->
135-
## 使用 Kompose
134+
## 使用 Kompose {#use-kompose}
136135

137136
<!--
138137
In a few steps, we'll take you from Docker Compose to Kubernetes. All
@@ -141,9 +140,10 @@ you need is an existing `docker-compose.yml` file.
141140
再需几步,我们就把你从 Docker Compose 带到 Kubernetes。
142141
你只需要一个现有的 `docker-compose.yml` 文件。
143142

144-
1. <!--Go to the directory containing your `docker-compose.yml` file. If you don't
145-
have one, test using this one.-->
146-
进入 `docker-compose.yml` 文件所在的目录。如果没有,请使用下面这个进行测试。
143+
<!--
144+
1. Go to the directory containing your `docker-compose.yml` file. If you don't have one, test using this one.
145+
-->
146+
1. 进入 `docker-compose.yml` 文件所在的目录。如果没有,请使用下面这个进行测试。
147147

148148
```yaml
149149
version: "2"
@@ -174,10 +174,10 @@ you need is an existing `docker-compose.yml` file.
174174
175175
<!--
176176
2. To convert the `docker-compose.yml` file to files that you can use with
177-
`kubectl`, run `kompose convert` and then `kubectl create -f <output file>`.
177+
`kubectl`, run `kompose convert` and then `kubectl apply -f <output file>`.
178178
-->
179179
2. 要将 `docker-compose.yml` 转换为 `kubectl` 可用的文件,请运行 `kompose convert`
180-
命令进行转换,然后运行 `kubectl create -f <output file>` 进行创建。
180+
命令进行转换,然后运行 `kubectl apply -f <output file>` 进行创建。
181181

182182
```shell
183183
kompose convert
@@ -318,7 +318,7 @@ Kompose 支持将 V1、V2 和 V3 版本的 Docker Compose 文件转换为 Kubern
318318
<!--
319319
### Kubernetes `kompose convert` example
320320
-->
321-
### Kubernetes `kompose convert` 示例
321+
### Kubernetes `kompose convert` 示例 {#kubernetes-kompose-convert-example}
322322

323323
```shell
324324
kompose --file docker-voting.yml convert
@@ -390,7 +390,7 @@ When multiple docker-compose files are provided the configuration is merged. Any
390390
<!--
391391
### OpenShift `kompose convert` example
392392
-->
393-
### OpenShift `kompose convert` 示例
393+
### OpenShift `kompose convert` 示例 {#openshift-kompose-convert-example}
394394
395395
```shell
396396
kompose --provider openshift --file docker-voting.yml convert
@@ -584,7 +584,7 @@ For example:
584584

585585
- 如果使用 Kubernetes 驱动,会有一个 Ingress 资源被创建,并且假定
586586
已经配置了相应的 Ingress 控制器。
587-
- 如果使用 OpenShift 驱动, 则会有一个 route 被创建。
587+
- 如果使用 OpenShift 驱动则会有一个 route 被创建。
588588

589589
例如:
590590

@@ -680,10 +680,10 @@ services:
680680

681681
If the Docker Compose file has a volume specified for a service, the Deployment (Kubernetes) or DeploymentConfig (OpenShift) strategy is changed to "Recreate" instead of "RollingUpdate" (default). This is done to avoid multiple instances of a service from accessing a volume at the same time.
682682
-->
683-
### 关于 Deployment Config 的提醒
683+
### 关于 Deployment Config 的提醒 {#warning-about-deployment-configurations}
684684

685-
如果 Docker Compose 文件中为服务声明了卷,Deployment (Kubernetes)
686-
DeploymentConfig (OpenShift) 策略会从 "RollingUpdate" (默认) 变为 "Recreate"
685+
如果 Docker Compose 文件中为服务声明了卷,DeploymentKubernetes
686+
DeploymentConfigOpenShift策略会从 RollingUpdate”(默认)变为 Recreate
687687
这样做的目的是为了避免服务的多个实例同时访问卷。
688688

689689
<!--
@@ -692,7 +692,7 @@ Please note that changing service name might break some `docker-compose` files.
692692
-->
693693
如果 Docker Compose 文件中的服务名包含 `_`(例如 `web_service`),
694694
那么将会被替换为 `-`,服务也相应的会重命名(例如 `web-service`)。
695-
Kompose 这样做的原因是 "Kubernetes" 不允许对象名称中包含 `_`。
695+
Kompose 这样做的原因是 Kubernetes 不允许对象名称中包含 `_`。
696696

697697
请注意,更改服务名称可能会破坏一些 `docker-compose` 文件。
698698

@@ -711,4 +711,3 @@ Kompose 支持的 Docker Compose 版本包括:1、2 和 3。
711711
所有三个版本的兼容性列表请查看我们的
712712
[转换文档](https://github.com/kubernetes/kompose/blob/master/docs/conversion.md),
713713
文档中列出了所有不兼容的 Docker Compose 关键字。
714-

0 commit comments

Comments
 (0)