From 5115d4fa7dc3aace4315bc2ae7f3d5c23312de1e Mon Sep 17 00:00:00 2001 From: lIuDuI <1693291525@qq.com> Date: Mon, 18 Mar 2019 09:59:10 +0800 Subject: [PATCH] ZH-trans: update basic-stateful-set.md (#13178) * Update basic-stateful-set.md * Update basic-stateful-set.md * Update basic-stateful-set.md * Update basic-stateful-set.md * Update basic-stateful-set.md --- .../stateful-application/basic-stateful-set.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/content/zh/docs/tutorials/stateful-application/basic-stateful-set.md b/content/zh/docs/tutorials/stateful-application/basic-stateful-set.md index 81a6b1b356..025b91b9bb 100644 --- a/content/zh/docs/tutorials/stateful-application/basic-stateful-set.md +++ b/content/zh/docs/tutorials/stateful-application/basic-stateful-set.md @@ -6,7 +6,7 @@ approvers: - janetkuo - kow3ns - smarterclayton -title: StatefulSet基本使用 +title: StatefulSet 基本使用 content_template: templates/tutorial --- @@ -20,7 +20,7 @@ content_template: templates/tutorial 在开始本教程之前,你应该熟悉以下 Kubernetes 的概念: * [Pods](/docs/user-guide/pods/single-container/) -* [Cluster DNS](/docs/concepts/services-networking/dns-pod-service/) +* [集群 DNS](/docs/concepts/services-networking/dns-pod-service/) * [Headless Services](/docs/concepts/services-networking/service/#headless-services) * [PersistentVolumes](/docs/concepts/storage/volumes/) * [PersistentVolume Provisioning](http://releases.k8s.io/{{< param "githubbranch" >}}/examples/persistent-volume-provisioning/) @@ -46,10 +46,10 @@ StatefulSets 旨在与有状态的应用及分布式系统一起使用。然而 {{% capture lessoncontent %}} -##创建 StatefulSet +## 创建 StatefulSet -作为开始,使用如下示例创建一个 StatefulSet。它和 [StatefulSets](/docs/concepts/abstractions/controllers/statefulsets/) 概念中的示例相似。它创建了一个 [Headless Service](/docs/user-guide/services/#headless-services) `nginx` 用来发布StatefulSet `web` 中的 Pod 的 IP 地址。 +作为开始,使用如下示例创建一个 StatefulSet。它和 [StatefulSets](/docs/concepts/abstractions/controllers/statefulsets/) 概念中的示例相似。它创建了一个 [Headless Service](/docs/user-guide/services/#headless-services) `nginx` 用来发布 StatefulSet `web` 中的 Pod 的 IP 地址。 {{< code file="web.yaml" >}} @@ -131,7 +131,7 @@ web-1 1/1 Running 0 1m ``` -如同 [StatefulSets](/docs/concepts/abstractions/controllers/statefulsets/) 概念中所提到的, StatefulSet 中的 Pod 拥有一个具有黏性的、独一无二的身份标志。这个标志基于 StatefulSet 控制器分配给每个 Pod 的唯一顺序索引。 Pod 的名称的形式为`-`。`web` StatefulSet 拥有两个副本,所以它创建了两个 Pod:`web-0`和`web-1`。 +如同 [StatefulSets](/docs/concepts/abstractions/controllers/statefulsets/) 概念中所提到的, StatefulSet 中的 Pod 拥有一个具有黏性的、独一无二的身份标志。这个标志基于 StatefulSet 控制器分配给每个 Pod 的唯一顺序索引。 Pod 的名称的形式为 `-`。`web` StatefulSet 拥有两个副本,所以它创建了两个 Pod:`web-0` 和 `web-1`。 ### 使用稳定的网络身份标识 @@ -451,6 +451,7 @@ pod "web-0" deleted <-- Watch the `web-0` Pod, and wait for it to transition to Running and Ready. --> + 观察 `web-0` Pod, 等待它变成 Running 和 Ready。 ```shell @@ -477,8 +478,11 @@ web-1 k8s.gcr.io/nginx-slim:0.8 web-2 k8s.gcr.io/nginx-slim:0.8 ``` + +`web-0` 已经更新了它的镜像,但是 `web-1` 和 `web-2` 仍保留了原始镜像。 ​```shell kubectl delete pod web-1 web-2