Skip to content

Commit e79e5c5

Browse files
committed
[zh-cn] sync task files of task-6
1 parent 5dc312c commit e79e5c5

File tree

4 files changed

+46
-38
lines changed

4 files changed

+46
-38
lines changed

content/zh-cn/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity.md

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: 用节点亲和性把 Pods 分配到节点
2+
title: 用节点亲和性把 Pod 分配到节点
33
min-kubernetes-server-version: v1.10
44
content_type: task
5-
weight: 120
5+
weight: 160
66
---
77
<!--
88
title: Assign Pods to Nodes using Node Affinity
99
min-kubernetes-server-version: v1.10
1010
content_type: task
11-
weight: 120
11+
weight: 160
1212
-->
1313

1414
<!-- overview -->
@@ -29,19 +29,22 @@ Kubernetes cluster.
2929

3030
<!--
3131
## Add a label to a node
32-
33-
1. List the nodes in your cluster, along with their labels:
3432
-->
3533
## 给节点添加标签
3634

35+
<!--
36+
1. List the nodes in your cluster, along with their labels:
37+
-->
3738
1. 列出集群中的节点及其标签:
3839

3940
```shell
4041
kubectl get nodes --show-labels
4142
```
43+
4244
<!--
4345
The output is similar to this:
4446
-->
47+
4548
输出类似于此:
4649

4750
```
@@ -50,23 +53,26 @@ Kubernetes cluster.
5053
worker1 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker1
5154
worker2 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker2
5255
```
53-
<!--
54-
1. Chose one of your nodes, and add a label to it:
55-
-->
56-
1. 选择一个节点,给它添加一个标签:
56+
57+
<!--
58+
1. Choose one of your nodes, and add a label to it:
59+
-->
60+
2. 选择一个节点,给它添加一个标签:
5761

5862
```shell
5963
kubectl label nodes <your-node-name> disktype=ssd
6064
```
61-
<!--
62-
where `<your-node-name>` is the name of your chosen node.
6365

64-
1. Verify that your chosen node has a `disktype=ssd` label:
66+
<!--
67+
where `<your-node-name>` is the name of your chosen node.
6568
-->
6669

6770
其中 `<your-node-name>` 是你所选节点的名称。
6871

69-
2. 验证你所选节点具有 `disktype=ssd` 标签:
72+
<!--
73+
1. Verify that your chosen node has a `disktype=ssd` label:
74+
-->
75+
3. 验证你所选节点具有 `disktype=ssd` 标签:
7076

7177
```shell
7278
kubectl get nodes --show-labels
@@ -75,6 +81,7 @@ Kubernetes cluster.
7581
<!--
7682
The output is similar to this:
7783
-->
84+
7885
输出类似于此:
7986

8087
```
@@ -85,9 +92,10 @@ Kubernetes cluster.
8592
```
8693

8794
<!--
88-
In the preceding output, you can see that the `worker0` node has a
89-
`disktype=ssd` label.
95+
In the preceding output, you can see that the `worker0` node has a
96+
`disktype=ssd` label.
9097
-->
98+
9199
在前面的输出中,可以看到 `worker0` 节点有一个 `disktype=ssd` 标签。
92100

93101
<!--
@@ -113,18 +121,19 @@ This means that the pod will get scheduled only on a node that has a `disktype=s
113121
kubectl apply -f https://k8s.io/examples/pods/pod-nginx-required-affinity.yaml
114122
```
115123

116-
<!--
117-
1. Verify that the pod is running on your chosen node:
118-
-->
119-
1. 验证 pod 已经在所选节点上运行:
124+
<!--
125+
1. Verify that the pod is running on your chosen node:
126+
-->
127+
2. 验证 Pod 已经在所选节点上运行:
120128

121129
```shell
122130
kubectl get pods --output=wide
123131
```
124132

125-
<!--
133+
<!--
126134
The output is similar to this:
127-
-->
135+
-->
136+
128137
输出类似于此:
129138

130139
```
@@ -140,8 +149,8 @@ This means that the pod will prefer a node that has a `disktype=ssd` label.
140149
-->
141150
## 使用首选的节点亲和性调度 Pod {#schedule-a-Pod-using-preferred-node-affinity}
142151

143-
本清单描述了一个Pod,它有一个节点亲和性设置 `preferredDuringSchedulingIgnoredDuringExecution``disktype: ssd`
144-
这意味着 pod 将首选具有 `disktype=ssd` 标签的节点。
152+
本清单描述了一个 Pod,它有一个节点亲和性设置 `preferredDuringSchedulingIgnoredDuringExecution``disktype: ssd`
153+
这意味着 Pod 将首选具有 `disktype=ssd` 标签的节点。
145154

146155
{{< codenew file="pods/pod-nginx-preferred-affinity.yaml" >}}
147156

@@ -155,10 +164,10 @@ This means that the pod will prefer a node that has a `disktype=ssd` label.
155164
kubectl apply -f https://k8s.io/examples/pods/pod-nginx-preferred-affinity.yaml
156165
```
157166

158-
<!--
159-
1. Verify that the pod is running on your chosen node:
160-
-->
161-
1. 验证 pod 是否在所选节点上运行:
167+
<!--
168+
1. Verify that the pod is running on your chosen node:
169+
-->
170+
2. 验证 Pod 是否在所选节点上运行:
162171

163172
```shell
164173
kubectl get pods --output=wide
@@ -167,6 +176,7 @@ This means that the pod will prefer a node that has a `disktype=ssd` label.
167176
<!--
168177
The output is similar to this:
169178
-->
179+
170180
输出类似于此:
171181

172182
```
@@ -182,5 +192,4 @@ This means that the pod will prefer a node that has a `disktype=ssd` label.
182192
Learn more about
183193
[Node Affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity).
184194
-->
185-
进一步了解
186-
[节点亲和性](/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity).
195+
进一步了解[节点亲和性](/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity)。

content/zh-cn/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: 配置存活、就绪和启动探针
33
content_type: task
4-
weight: 110
4+
weight: 140
55
---
66
<!--
77
title: Configure Liveness, Readiness and Startup Probes
88
content_type: task
9-
weight: 110
9+
weight: 140
1010
-->
1111

1212
<!-- overview -->

content/zh-cn/docs/tasks/configure-pod-container/configure-pod-initialization.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: 配置 Pod 初始化
33
content_type: task
4-
weight: 130
4+
weight: 170
55
---
66

77
<!--
88
title: Configure Pod Initialization
99
content_type: task
10-
weight: 130
10+
weight: 170
1111
-->
1212

1313
<!-- overview -->
@@ -69,7 +69,7 @@ Create the Pod:
6969
创建 Pod:
7070

7171
```shell
72-
kubectl create -f https://k8s.io/examples/pods/init-containers.yaml
72+
kubectl apply -f https://k8s.io/examples/pods/init-containers.yaml
7373
```
7474

7575
<!--
@@ -132,7 +132,7 @@ The output shows that nginx is serving the web page that was written by the init
132132

133133
<!--
134134
* Learn more about
135-
[communicating between Containers running in the same Pod](/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/).
135+
[communicating between Containers running in the same Pod](/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/).
136136
* Learn more about [Init Containers](/docs/concepts/workloads/pods/init-containers/).
137137
* Learn more about [Volumes](/docs/concepts/storage/volumes/).
138138
* Learn more about [Debugging Init Containers](/docs/tasks/debug/debug-application/debug-init-containers/)
@@ -142,4 +142,3 @@ The output shows that nginx is serving the web page that was written by the init
142142
* 进一步了解 [Init 容器](/zh-cn/docs/concepts/workloads/pods/init-containers/)
143143
* 进一步了解[](/zh-cn/docs/concepts/storage/volumes/)
144144
* 进一步了解 [Init 容器排错](/zh-cn/docs/tasks/debug/debug-application/debug-init-containers/)
145-

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: 将 Docker Compose 文件转换为 Kubernetes 资源
33
content_type: task
4-
weight: 200
4+
weight: 230
55
---
66
<!--
77
reviewers:
88
- cdrage
99
title: Translate a Docker Compose File to Kubernetes Resources
1010
content_type: task
11-
weight: 200
11+
weight: 230
1212
-->
1313

1414
<!-- overview -->

0 commit comments

Comments
 (0)