Skip to content

Commit c3fc079

Browse files
committed
[zh-cn] updated /stateful-application/cassandra.md
1 parent a335233 commit c3fc079

File tree

1 file changed

+22
-24
lines changed
  • content/zh-cn/docs/tutorials/stateful-application

1 file changed

+22
-24
lines changed

content/zh-cn/docs/tutorials/stateful-application/cassandra.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@ This tutorial shows you how to run [Apache Cassandra](https://cassandra.apache.o
1818
Cassandra, a database, needs persistent storage to provide data durability (application _state_).
1919
In this example, a custom Cassandra seed provider lets the database discover new Cassandra instances as they join the Cassandra cluster.
2020
-->
21-
本教程描述拉如何在 Kubernetes 上运行 [Apache Cassandra](https://cassandra.apache.org/)
22-
数据库 Cassandra 需要永久性存储提供数据持久性(应用“状态”)。
23-
在此示例中,自定义 Cassandra seed provider 使数据库在加入 Cassandra
24-
集群时发现新的 Cassandra 实例。
21+
本教程描述了如何在 Kubernetes 上运行 [Apache Cassandra](https://cassandra.apache.org/)
22+
数据库 Cassandra 需要永久性存储提供数据持久性(应用**状态**)。
23+
在此示例中,自定义 Cassandra seed provider 使数据库在接入 Cassandra 集群时能够发现新的 Cassandra 实例。
2524

2625
<!--
2726
*StatefulSets* make it easier to deploy stateful applications into your Kubernetes cluster.
2827
For more information on the features used in this tutorial, see
2928
[StatefulSet](/docs/concepts/workloads/controllers/statefulset/).
3029
-->
31-
使用"StatefulSets"可以更轻松地将有状态的应用程序部署到你的 Kubernetes 集群中。
30+
使用**StatefulSet**可以更轻松地将有状态的应用程序部署到你的 Kubernetes 集群中。
3231
有关本教程中使用的功能的更多信息,
33-
参阅 [StatefulSet](/zh-cn/docs/concepts/workloads/controllers/statefulset/)
32+
请参阅 [StatefulSet](/zh-cn/docs/concepts/workloads/controllers/statefulset/)
3433

3534
{{< note >}}
3635
<!--
@@ -40,8 +39,8 @@ of the Cassandra cluster (called a _ring_). When those Pods run in your Kubernet
4039
the Kubernetes control plane schedules those Pods onto Kubernetes
4140
{{< glossary_tooltip text="Nodes" term_id="node" >}}.
4241
-->
43-
Cassandra 和 Kubernetes 都使用术语节点(node)来表示集群的成员。
44-
在本教程中,属于 StatefulSet 的 Pod 是 Cassandra 节点,并且是 Cassandra 集群的成员(称为 ring)。
42+
Cassandra 和 Kubernetes 都使用术语**节点(node)**来表示集群的成员。
43+
在本教程中,属于 StatefulSet 的 Pod 是 Cassandra 节点,并且是 Cassandra 集群的成员(称为 **ring**)。
4544
当这些 Pod 在你的 Kubernetes 集群中运行时,Kubernetes 控制平面会将这些 Pod 调度到 Kubernetes 的
4645
{{< glossary_tooltip text="节点" term_id="node" >}}上。
4746

@@ -51,9 +50,9 @@ nodes in the ring.
5150
This tutorial deploys a custom Cassandra seed provider that lets the database discover
5251
new Cassandra Pods as they appear inside your Kubernetes cluster.
5352
-->
54-
当 Cassandra 节点启动时,使用 _seed列表_ 来引导发现 ring 中其他节点
55-
本教程部署了一个自定义的 Cassandra seed provider,使数据库可以发现新的 Cassandra Pod
56-
出现在 Kubernetes 集群中
53+
当 Cassandra 节点启动时,使用 **seed 列表**来引导发现 ring 中的其他节点
54+
本教程部署了一个自定义的 Cassandra seed provider,
55+
使数据库可以发现 Kubernetes 集群中出现的新的 Cassandra Pod
5756
{{< /note >}}
5857

5958
## {{% heading "objectives" %}}
@@ -65,11 +64,11 @@ new Cassandra Pods as they appear inside your Kubernetes cluster.
6564
* Modify the StatefulSet.
6665
* Delete the StatefulSet and its {{< glossary_tooltip text="Pods" term_id="pod" >}}.
6766
-->
68-
* 创建并验证 Cassandra 无头(headless){{< glossary_tooltip text="Service" term_id="service" >}}..
67+
* 创建并验证 Cassandra 无头(headless){{< glossary_tooltip text="Service" term_id="service" >}}
6968
* 使用 {{< glossary_tooltip term_id="StatefulSet" >}} 创建一个 Cassandra ring。
7069
* 验证 StatefulSet。
7170
* 修改 StatefulSet。
72-
* 删除 StatefulSet 及其 {{< glossary_tooltip text="Pod" term_id="pod" >}}.
71+
* 删除 StatefulSet 及其 {{< glossary_tooltip text="Pod" term_id="pod" >}}
7372

7473
## {{% heading "prerequisites" %}}
7574

@@ -81,7 +80,7 @@ To complete this tutorial, you should already have a basic familiarity with
8180
{{< glossary_tooltip text="Services" term_id="service" >}}, and
8281
{{< glossary_tooltip text="StatefulSets" term_id="StatefulSet" >}}.
8382
-->
84-
要完成本教程,你应该已经熟悉 {{< glossary_tooltip text="Pod" term_id="pod" >}}
83+
要完成本教程,你应该已经熟悉 {{< glossary_tooltip text="Pod" term_id="pod" >}}
8584
{{< glossary_tooltip text="Service" term_id="service" >}} 和
8685
{{< glossary_tooltip text="StatefulSet" term_id="StatefulSet" >}}。
8786

@@ -96,14 +95,14 @@ errors during this tutorial. To avoid these errors, start Minikube with the foll
9695
### 额外的 Minikube 设置说明
9796

9897
{{< caution >}}
99-
[Minikube](https://minikube.sigs.k8s.io/docs/)默认为 2048MB 内存和 2 个 CPU。
100-
在本教程中,使用默认资源配置运行 Minikube 会导致资源不足的错误。为避免这些错误,请使用以下设置启动 Minikube:
98+
[Minikube](https://minikube.sigs.k8s.io/docs/) 默认需要 2048MB 内存和 2 个 CPU。
99+
在本教程中,使用默认资源配置运行 Minikube 会出现资源不足的错误。为避免这些错误,请使用以下设置启动 Minikube:
101100

102101
```shell
103102
minikube start --memory 5120 --cpus=4
104103
```
105-
{{< /caution >}}
106104

105+
{{< /caution >}}
107106

108107
<!-- lessoncontent -->
109108
<!--
@@ -186,7 +185,7 @@ Please update the following StatefulSet for the cloud you are working with.
186185
<!--
187186
Create the Cassandra StatefulSet from the `cassandra-statefulset.yaml` file:
188187
-->
189-
使用 `cassandra-statefulset.yaml` 文件创建 Cassandra StatefulSet
188+
使用 `cassandra-statefulset.yaml` 文件创建 Cassandra StatefulSet:
190189

191190
```shell
192191
# 如果你能未经修改地 apply cassandra-statefulset.yaml,请使用此命令
@@ -318,10 +317,9 @@ Use `kubectl edit` to modify the size of a Cassandra StatefulSet.
318317
此命令你的终端中打开一个编辑器。需要更改的是 `replicas` 字段。下面是 StatefulSet 文件的片段示例:
319318

320319
```yaml
321-
# Please edit the object below. Lines beginning with a '#' will be ignored,
322-
# and an empty file will abort the edit. If an error occurs while saving this file will be
323-
# reopened with the relevant failures.
324-
#
320+
# 请编辑以下对象。以 '#' 开头的行将被忽略,
321+
# 且空文件将放弃编辑。如果保存此文件时发生错误,
322+
# 将重新打开并显示相关故障。
325323
apiVersion: apps/v1
326324
kind: StatefulSet
327325
metadata:
@@ -378,7 +376,7 @@ This setting is for your safety because your data is more valuable than automati
378376
Depending on the storage class and reclaim policy, deleting the *PersistentVolumeClaims* may cause the associated volumes
379377
to also be deleted. Never assume you'll be able to access data if its volume claims are deleted.
380378
-->
381-
根据存储类和回收策略,删除 *PersistentVolumeClaims* 可能导致关联的卷也被删除。
379+
根据存储类和回收策略,删除 **PersistentVolumeClaims** 可能导致关联的卷也被删除。
382380
千万不要认为其容量声明被删除,你就能访问数据。
383381
{{< /warning >}}
384382

@@ -422,7 +420,7 @@ By using environment variables you can change values that are inserted into `cas
422420
镜像。上面的 Docker 镜像基于 [debian-base](https://github.com/kubernetes/release/tree/master/images/build/debian-base)
423421
并且包含 OpenJDK 8。
424422

425-
该映像包括来自 Apache Debian 存储库的标准 Cassandra 安装。
423+
该镜像包括来自 Apache Debian 存储库的标准 Cassandra 安装。
426424
通过使用环境变量,你可以更改插入到 `cassandra.yaml` 中的值。
427425

428426
| 环境变量 | 默认值 |

0 commit comments

Comments
 (0)