From e9cf05db66a414e9afdcab8b943675b026ffefaa Mon Sep 17 00:00:00 2001 From: huccshen <1171593960@qq.com> Date: Mon, 31 Aug 2020 10:11:29 +0800 Subject: [PATCH 1/2] Update deployment.md --- content/zh/docs/concepts/workloads/controllers/deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/zh/docs/concepts/workloads/controllers/deployment.md b/content/zh/docs/concepts/workloads/controllers/deployment.md index d0537de82a..68f5ed1e55 100644 --- a/content/zh/docs/concepts/workloads/controllers/deployment.md +++ b/content/zh/docs/concepts/workloads/controllers/deployment.md @@ -1763,9 +1763,9 @@ configuring containers, and [using kubectl to manage resources](/docs/concepts/o -除了 Pod 的必填字段外, Deployment 中的 Pod 模板必须指定适当的标签和适当的重新启动策略。对于标签,请确保不要与其他控制器重叠。请参考[选择器](#selector))。 +除了 Pod 的必填字段外, Deployment 中的 Pod 模板必须指定适当的标签和适当的重新启动策略。对于标签,请确保不要与其他控制器重叠。请参考[选择器](#selector)。 2. 运行 `kubectl get deployments` 以检查 Deployment 是否已创建。如果仍在创建 Deployment ,则输出以下内容: - ```shell + ``` NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx-deployment 3 0 0 0 1s ``` @@ -247,7 +247,7 @@ The following is an example of a Deployment. It creates a ReplicaSet to bring up --> 3. 要查看 Deployment 展开状态,运行 `kubectl rollout status deployment.v1.apps/nginx-deployment`。输出: - ```shell + ``` Waiting for rollout to finish: 2 out of 3 new replicas have been updated... deployment.apps/nginx-deployment successfully rolled out ``` @@ -257,7 +257,7 @@ The following is an example of a Deployment. It creates a ReplicaSet to bring up --> 4. 几秒钟后再次运行 `kubectl get deployments`。输出: - ```shell + ``` NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx-deployment 3 3 3 3 18s ``` @@ -271,7 +271,7 @@ The following is an example of a Deployment. It creates a ReplicaSet to bring up --> 5. 要查看 Deployment 创建的 ReplicaSet (`rs`),运行 `kubectl get rs`。输出: - ```shell + ``` NAME DESIRED CURRENT READY AGE nginx-deployment-75675f5897 3 3 3 18s ``` @@ -286,7 +286,7 @@ The following is an example of a Deployment. It creates a ReplicaSet to bring up --> 6. 要查看每个 Pod 自动生成的标签,运行 `kubectl get pods --show-labels`。返回以下输出: - ```shell + ``` NAME READY STATUS RESTARTS AGE LABELS nginx-deployment-75675f5897-7ci7o 1/1 Running 0 18s app=nginx,pod-template-hash=3123191453 nginx-deployment-75675f5897-kzszj 1/1 Running 0 18s app=nginx,pod-template-hash=3123191453