ZH-trans: update cassandra.md#14004
Merged
k8s-ci-robot merged 2 commits intokubernetes:masterfrom Apr 24, 2019
Merged
Conversation
Contributor
xichengliudui
commented
Apr 24, 2019
Contributor
Author
|
/cc SataQiu |
|
Deploy preview for kubernetes-io-master-staging ready! Built with commit d4eb822 https://deploy-preview-14004--kubernetes-io-master-staging.netlify.com |
SataQiu
reviewed
Apr 24, 2019
|
|
||
|
|
||
| Pods 使用来自 Google 的 [container registry](https://cloud.google.com/container-registry/docs/) 的 [```gcr.io/google-samples/cassandra:v12```](https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile) 镜像。这个 docker 镜像基于 `debian:jessie` 并包含 OpenJDK 8。该镜像包含一个从 Apache Debian 源中安装的标准 Cassandra。你可以通过使用环境变量改变插入到 `cassandra.yaml` 文件中的参数值。 | ||
| Pod 使用来自 Google [容器注册表](https://cloud.google.com/container-registry/docs/) 的 [```gcr.io/google-samples/cassandra:v12```](https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile) 镜像。这个 docker 镜像基于 `debian:jessie` 并包含 OpenJDK 8。该镜像包含一个从 Apache Debian 源中安装的标准 Cassandra。你可以通过使用环境变量改变插入到 `cassandra.yaml` 文件中的参数值。 |
| cd examples | ||
|
|
||
| # create a service to track all cassandra statefulset nodes | ||
| # 创建服务来跟踪所有 cassandra 状态集节点 |
| kubectl create -f cassandra/cassandra-statefulset.yaml | ||
|
|
||
| # validate the Cassandra cluster. Substitute the name of one of your pods. | ||
| # 验证Cassandra集群。替换一个 pod 的名称。 |
| # | ||
|
|
||
| # create a replication controller to replicate cassandra nodes | ||
| # 创建一个复制控制器来复制 cassandra 节点 |
| kubectl scale rc cassandra --replicas=4 | ||
|
|
||
| # delete the replication controller | ||
| # 删除复制控制器 |
| 这个 Service 用于在Kubernetes 集群内部进行 Cassandra 客户端和 Cassandra Pods之间的 DNS 查找。 | ||
| Kubernetes _[Service](/docs/user-guide/services)_ 描述一组执行同样任务的 [_Pod_](/docs/user-guide/pods)。在 Kubernetes 中,一个应用的原子调度单位是一个 Pod:一个或多个_必须_调度到相同主机上的容器。 | ||
|
|
||
| 这个 Service 用于在 Kubernetes 集群内部进行 Cassandra 客户端和 Cassandra Pod之间的 DNS 查找。 |
Member
There was a problem hiding this comment.
Suggested change
| 这个 Service 用于在 Kubernetes 集群内部进行 Cassandra 客户端和 Cassandra Pod之间的 DNS 查找。 | |
| 这个 Service 用于在 Kubernetes 集群内部进行 Cassandra 客户端和 Cassandra Pod 之间的 DNS 查找。 |
|
|
||
| 如果返回错误则表示 service 创建失败。 | ||
|
|
||
| ## 步骤 2:使用 StatefulSet 创建 Cassandra Ring环 |
Member
There was a problem hiding this comment.
Suggested change
| ## 步骤 2:使用 StatefulSet 创建 Cassandra Ring环 | |
| ## 步骤 2:使用 StatefulSet 创建 Cassandra Ring 环 |
|
|
||
|
|
||
| 对于 Kubernetes 1.5 发布版,beta StatefulSet 资源没有像 Deployment, ReplicaSet, Replication Controller或者 Job一样,包含 `kubectl scale` 功能, | ||
| 对于 Kubernetes 1.5 发布版,beta StatefulSet 资源没有像 Deployment, ReplicaSet, Replication Controller 或者 Job一样,包含 `kubectl scale` 功能, |
Member
There was a problem hiding this comment.
Suggested change
| 对于 Kubernetes 1.5 发布版,beta StatefulSet 资源没有像 Deployment, ReplicaSet, Replication Controller 或者 Job一样,包含 `kubectl scale` 功能, | |
| 对于 Kubernetes 1.5 发布版,beta StatefulSet 资源没有像 Deployment, ReplicaSet, Replication Controller 或者 Job 一样,包含 `kubectl scale` 功能。 |
|
|
||
| 因为这些 pods 拥有 `app=cassandra` 标签,它们被映射给了我们在步骤1中创建的 service。 | ||
|
|
||
| 因为这些 pod 拥有 `app=cassandra` 标签,它们被映射给了我们在步骤1中创建的 service。 |
Member
There was a problem hiding this comment.
Suggested change
| 因为这些 pod 拥有 `app=cassandra` 标签,它们被映射给了我们在步骤1中创建的 service。 | |
| 因为这些 pod 拥有 `app=cassandra` 标签,它们被映射给了我们在步骤 1 中创建的 service。 |
Member
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SataQiu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.