Skip to content

Commit 7f78411

Browse files
authored
Merge pull request #32736 from 0xff-dev/main
[zh] update run-replicated-stateful-application.md
2 parents ce94db1 + e10ed9e commit 7f78411

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/zh/docs/tasks/run-application/run-replicated-stateful-application.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ on general patterns for running stateful applications in Kubernetes.
4343

4444
## {{% heading "prerequisites" %}}
4545

46-
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
47-
{{< include "default-storage-class-prereqs.md" >}}
46+
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
47+
* {{< include "default-storage-class-prereqs.md" >}}
4848

4949
<!--
5050
* This tutorial assumes you are familiar with
@@ -146,7 +146,7 @@ resolving `<pod-name>.mysql` from within any other Pod in the same Kubernetes
146146
cluster and namespace.
147147
-->
148148
这个无头服务给 StatefulSet 控制器为集合中每个 Pod 创建的 DNS 条目提供了一个宿主。
149-
因为服务名为 `mysql`,所以可以通过在同一 Kubernetes 集群和名字中的任何其他 Pod
149+
因为无头服务名为 `mysql`,所以可以通过在同一 Kubernetes 集群和命名空间中的任何其他 Pod
150150
内解析 `<Pod 名称>.mysql` 来访问 Pod。
151151

152152
<!--
@@ -274,7 +274,7 @@ controller into the domain of MySQL server IDs, which require the same
274274
properties.
275275
-->
276276
该脚本通过从 Pod 名称的末尾提取索引来确定自己的序号索引,而 Pod 名称由 `hostname` 命令返回。
277-
然后将序数(带有数字偏移量以避免保留值)保存到 MySQL conf.d 目录中的文件 server-id.cnf。
277+
然后将序数(带有数字偏移量以避免保留值)保存到 MySQL `conf.d` 目录中的文件 `server-id.cnf`
278278
这一操作将 StatefulSet 所提供的唯一、稳定的标识转换为 MySQL 服务器的 ID,
279279
而这些 ID 也是需要唯一性、稳定性保证的。
280280

@@ -290,7 +290,7 @@ Combined with the StatefulSet controller's
290290
this ensures the primary MySQL server is Ready before creating replicas, so they can begin
291291
replicating.
292292
-->
293-
通过将内容复制到 conf.d 中,`init-mysql` 容器中的脚本也可以应用 ConfigMap 中的
293+
通过将内容复制到 `conf.d` 中,`init-mysql` 容器中的脚本也可以应用 ConfigMap 中的
294294
`primary.cnf``replica.cnf`
295295
由于示例部署结构由单个 MySQL 主节点和任意数量的副本节点组成,
296296
因此脚本仅将序数 `0` 指定为主节点,而将其他所有节点指定为副本节点。
@@ -341,7 +341,7 @@ Ready before starting Pod `N+1`.
341341
MySQL 本身不提供执行此操作的机制,因此本示例使用了一种流行的开源工具 Percona XtraBackup。
342342
在克隆期间,源 MySQL 服务器性能可能会受到影响。
343343
为了最大程度地减少对 MySQL 主服务器的影响,该脚本指示每个 Pod 从序号较低的 Pod 中克隆。
344-
可以这样做的原因是 StatefulSet 控制器始终确保在启动 Pod N + 1 之前 Pod N 已准备就绪。
344+
可以这样做的原因是 StatefulSet 控制器始终确保在启动 Pod `N + 1` 之前 Pod `N` 已准备就绪。
345345

346346
<!--
347347
### Starting replication

0 commit comments

Comments
 (0)