@@ -43,8 +43,8 @@ on general patterns for running stateful applications in Kubernetes.
43
43
44
44
## {{% heading "prerequisites" %}}
45
45
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" >}}
48
48
49
49
<!--
50
50
* This tutorial assumes you are familiar with
@@ -146,7 +146,7 @@ resolving `<pod-name>.mysql` from within any other Pod in the same Kubernetes
146
146
cluster and namespace.
147
147
-->
148
148
这个无头服务给 StatefulSet 控制器为集合中每个 Pod 创建的 DNS 条目提供了一个宿主。
149
- 因为服务名为 ` mysql ` ,所以可以通过在同一 Kubernetes 集群和名字中的任何其他 Pod
149
+ 因为无头服务名为 ` mysql ` ,所以可以通过在同一 Kubernetes 集群和命名空间中的任何其他 Pod
150
150
内解析 ` <Pod 名称>.mysql ` 来访问 Pod。
151
151
152
152
<!--
@@ -274,7 +274,7 @@ controller into the domain of MySQL server IDs, which require the same
274
274
properties.
275
275
-->
276
276
该脚本通过从 Pod 名称的末尾提取索引来确定自己的序号索引,而 Pod 名称由 ` hostname ` 命令返回。
277
- 然后将序数(带有数字偏移量以避免保留值)保存到 MySQL conf.d 目录中的文件 server-id.cnf。
277
+ 然后将序数(带有数字偏移量以避免保留值)保存到 MySQL ` conf.d ` 目录中的文件 ` server-id.cnf ` 。
278
278
这一操作将 StatefulSet 所提供的唯一、稳定的标识转换为 MySQL 服务器的 ID,
279
279
而这些 ID 也是需要唯一性、稳定性保证的。
280
280
@@ -290,7 +290,7 @@ Combined with the StatefulSet controller's
290
290
this ensures the primary MySQL server is Ready before creating replicas, so they can begin
291
291
replicating.
292
292
-->
293
- 通过将内容复制到 conf.d 中,` init-mysql ` 容器中的脚本也可以应用 ConfigMap 中的
293
+ 通过将内容复制到 ` conf.d ` 中,` init-mysql ` 容器中的脚本也可以应用 ConfigMap 中的
294
294
` primary.cnf ` 或 ` replica.cnf ` 。
295
295
由于示例部署结构由单个 MySQL 主节点和任意数量的副本节点组成,
296
296
因此脚本仅将序数 ` 0 ` 指定为主节点,而将其他所有节点指定为副本节点。
@@ -341,7 +341,7 @@ Ready before starting Pod `N+1`.
341
341
MySQL 本身不提供执行此操作的机制,因此本示例使用了一种流行的开源工具 Percona XtraBackup。
342
342
在克隆期间,源 MySQL 服务器性能可能会受到影响。
343
343
为了最大程度地减少对 MySQL 主服务器的影响,该脚本指示每个 Pod 从序号较低的 Pod 中克隆。
344
- 可以这样做的原因是 StatefulSet 控制器始终确保在启动 Pod N + 1 之前 Pod N 已准备就绪。
344
+ 可以这样做的原因是 StatefulSet 控制器始终确保在启动 Pod ` N + 1 ` 之前 Pod ` N ` 已准备就绪。
345
345
346
346
<!--
347
347
### Starting replication
0 commit comments