Skip to content

Commit a35cecc

Browse files
authored
Merge pull request #31842 from 0xff-dev/main
[zh] Update some grammar and spelling mistakes
2 parents 6c5fd95 + 7251b44 commit a35cecc

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

content/zh/docs/tutorials/stateful-application/zookeeper.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ The StatefulSet controller creates three Pods, and each Pod has a container with
215215
a [ZooKeeper](https://www-us.apache.org/dist/zookeeper/stable/) server.
216216
-->
217217
StatefulSet 控制器创建 3 个 Pods,每个 Pod 包含一个
218-
[ZooKeeper](https://www-us.apache.org/dist/zookeeper/stable/) 服务器
218+
[ZooKeeper](https://www-us.apache.org/dist/zookeeper/stable/) 服务容器
219219

220220
<!--
221221
### Facilitating Leader Election
@@ -670,10 +670,10 @@ The `volumeMounts` section of the `StatefulSet`'s container `template` mounts th
670670
StatefulSet 的容器 `template` 中的 `volumeMounts` 一节使得
671671
PersistentVolumes 被挂载到 ZooKeeper 服务器的数据目录。
672672
673-
```shell
673+
```yaml
674674
volumeMounts:
675-
- name: datadir
676-
mountPath: /var/lib/zookeeper
675+
- name: datadir
676+
mountPath: /var/lib/zookeeper
677677
```
678678

679679
<!--
@@ -682,7 +682,7 @@ same `PersistentVolume` mounted to the ZooKeeper server's data directory.
682682
Even when the Pods are rescheduled, all the writes made to the ZooKeeper
683683
servers' WALs, and all their snapshots, remain durable.
684684
-->
685-
`zk` StatefulSet 中的一个 Pod 被(重新)调度时,它总是拥有相同的 PersistentVolume,
685+
`zk` `StatefulSet` 中的一个 Pod 被(重新)调度时,它总是拥有相同的 PersistentVolume,
686686
挂载到 ZooKeeper 服务器的数据目录。
687687
即使在 Pods 被重新调度时,所有对 ZooKeeper 服务器的 WALs 的写入和它们的
688688
全部快照都仍然是持久的。
@@ -1110,17 +1110,17 @@ The Pod `template` for the `zk` `StatefulSet` specifies a liveness probe.
11101110
许多场景下,一个系统进程可以是活动状态但不响应请求,或者是不健康状态。
11111111
你应该使用存活性探针来通知 Kubernetes 你的应用进程处于不健康状态,需要被重启。
11121112

1113-
`zk` StatefulSet 的 Pod 的 `template` 一节指定了一个存活探针。
1113+
`zk` `StatefulSet` 的 Pod 的 `template` 一节指定了一个存活探针。
11141114

11151115
```yaml
1116-
livenessProbe:
1117-
exec:
1118-
command:
1119-
- sh
1120-
- -c
1121-
- "zookeeper-ready 2181"
1122-
initialDelaySeconds: 15
1123-
timeoutSeconds: 5
1116+
livenessProbe:
1117+
exec:
1118+
command:
1119+
- sh
1120+
- -c
1121+
- "zookeeper-ready 2181"
1122+
initialDelaySeconds: 15
1123+
timeoutSeconds: 5
11241124
```
11251125
11261126
<!--
@@ -1249,7 +1249,7 @@ By default, Kubernetes may co-locate Pods in a `StatefulSet` on the same node.
12491249
For the three server ensemble you created, if two servers are on the same node, and that node fails,
12501250
the clients of your ZooKeeper service will experience an outage until at least one of the Pods can be rescheduled.
12511251
-->
1252-
默认情况下,Kubernetes 可以把 StatefulSet 的 Pods 部署在相同节点上。
1252+
默认情况下,Kubernetes 可以把 `StatefulSet` 的 Pods 部署在相同节点上。
12531253
对于你创建的 3 个服务器的 ensemble 来说,如果有两个服务器并存于
12541254
相同的节点上并且该节点发生故障时,ZooKeeper 服务将中断,
12551255
直至至少一个 Pods 被重新调度。
@@ -1268,7 +1268,7 @@ Use the command below to get the nodes for Pods in the `zk` `StatefulSet`.
12681268
ZooKeeper 服务器为止。
12691269
但是,如果希望你的服务在容忍节点故障时无停服时间,你应该设置 `podAntiAffinity`。
12701270

1271-
获取 `zk` Stateful Set 中的 Pods 的节点。
1271+
使用下面的命令获取 `zk` `StatefulSet` 中的 Pods 的节点。
12721272

12731273
```shell
12741274
for i in 0 1 2; do kubectl get pod zk-$i --template {{.spec.nodeName}}; echo ""; done
@@ -1450,7 +1450,7 @@ zk-0 1/1 Running 0 1m
14501450
Keep watching the `StatefulSet`'s Pods in the first terminal and drain the node on which
14511451
`zk-1` is scheduled.
14521452
-->
1453-
在第一个终端中持续观察 StatefulSet 的 Pods 并腾空 `zk-1` 调度所在的节点。
1453+
在第一个终端中持续观察 `StatefulSet` 的 Pods 并腾空 `zk-1` 调度所在的节点。
14541454

14551455
```shell
14561456
kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force -delete-emptydir-data "kubernetes-node-ixsl" cordoned
@@ -1467,7 +1467,7 @@ The `zk-1` Pod cannot be scheduled because the `zk` `StatefulSet` contains a `Po
14671467
co-location of the Pods, and as only two nodes are schedulable, the Pod will remain in a Pending state.
14681468
-->
14691469
`zk-1` Pod 不能被调度,这是因为 `zk` `StatefulSet` 包含了一个防止 Pods
1470-
共存的 PodAntiAffinity 规则,而且只有两个节点可用于调度,
1470+
共存的 `PodAntiAffinity` 规则,而且只有两个节点可用于调度,
14711471
这个 Pod 将保持在 Pending 状态。
14721472

14731473
```shell
@@ -1498,7 +1498,7 @@ zk-1 0/1 Pending 0 0s
14981498
```
14991499

15001500
<!--
1501-
Continue to watch the Pods of the stateful set, and drain the node on which
1501+
Continue to watch the Pods of the StatefulSet, and drain the node on which
15021502
`zk-2` is scheduled.
15031503
-->
15041504
继续观察 StatefulSet 中的 Pods 并腾空 `zk-2` 调度所在的节点。
@@ -1522,7 +1522,7 @@ You cannot drain the third node because evicting `zk-2` would violate `zk-budget
15221522
15231523
Use `zkCli.sh` to retrieve the value you entered during the sanity test from `zk-0`.
15241524
-->
1525-
使用 `CRTL-C` 终止 kubectl。
1525+
使用 `CTRL-C` 终止 kubectl。
15261526

15271527
你不能腾空第三个节点,因为驱逐 `zk-2` 将和 `zk-budget` 冲突。
15281528
然而这个节点仍然处于隔离状态(Cordoned)。
@@ -1536,7 +1536,7 @@ kubectl exec zk-0 zkCli.sh get /hello
15361536
<!--
15371537
The service is still available because its `PodDisruptionBudget` is respected.
15381538
-->
1539-
由于遵守了 PodDisruptionBudget,服务仍然可用。
1539+
由于遵守了 `PodDisruptionBudget`,服务仍然可用。
15401540

15411541
```
15421542
WatchedEvent state:SyncConnected type:None path:null

0 commit comments

Comments
 (0)