From 4cab117f4254d2c881805f0da1ed7d05c4a7470a Mon Sep 17 00:00:00 2001 From: chenhonggc Date: Fri, 25 May 2018 14:55:32 +0800 Subject: [PATCH] Define environment variable container style (#8743) * define-environment-variable-container format * run-stateless-application-deployment format --- .../define-environment-variable-container.md | 8 ++++---- .../run-stateless-application-deployment.md | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md b/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md index 86550571ff..7b7820ecca 100644 --- a/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md +++ b/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md @@ -36,11 +36,11 @@ Pod: 1. Create a Pod based on the YAML configuration file: - kubectl create -f https://k8s.io/docs/tasks/inject-data-application/envars.yaml + kubectl create -f https://k8s.io/docs/tasks/inject-data-application/envars.yaml 1. List the running Pods: - kubectl get pods -l purpose=demonstrate-envars + kubectl get pods -l purpose=demonstrate-envars The output is similar to this: @@ -49,11 +49,11 @@ Pod: 1. Get a shell to the container running in your Pod: - kubectl exec -it envar-demo -- /bin/bash + kubectl exec -it envar-demo -- /bin/bash 1. In your shell, run the `printenv` command to list the environment variables. - root@envar-demo:/# printenv + root@envar-demo:/# printenv The output is similar to this: diff --git a/content/en/docs/tasks/run-application/run-stateless-application-deployment.md b/content/en/docs/tasks/run-application/run-stateless-application-deployment.md index 182a5b31ed..61b2f08f3d 100644 --- a/content/en/docs/tasks/run-application/run-stateless-application-deployment.md +++ b/content/en/docs/tasks/run-application/run-stateless-application-deployment.md @@ -41,11 +41,11 @@ a Deployment that runs the nginx:1.7.9 Docker image: 1. Create a Deployment based on the YAML file: - kubectl apply -f https://k8s.io/docs/tasks/run-application/deployment.yaml + kubectl apply -f https://k8s.io/docs/tasks/run-application/deployment.yaml 1. Display information about the Deployment: - kubectl describe deployment nginx-deployment + kubectl describe deployment nginx-deployment The output is similar to this: @@ -80,7 +80,7 @@ a Deployment that runs the nginx:1.7.9 Docker image: 1. List the pods created by the deployment: - kubectl get pods -l app=nginx + kubectl get pods -l app=nginx The output is similar to this: @@ -90,7 +90,7 @@ a Deployment that runs the nginx:1.7.9 Docker image: 1. Display information about a pod: - kubectl describe pod + kubectl describe pod where `` is the name of one of your pods. @@ -103,11 +103,11 @@ specifies that the deployment should be updated to use nginx 1.8. 1. Apply the new YAML file: - kubectl apply -f https://k8s.io/docs/tasks/run-application/deployment-update.yaml + kubectl apply -f https://k8s.io/docs/tasks/run-application/deployment-update.yaml 1. Watch the deployment create pods with new names and delete the old pods: - kubectl get pods -l app=nginx + kubectl get pods -l app=nginx ## Scaling the application by increasing the replica count @@ -119,11 +119,11 @@ should have four pods: 1. Apply the new YAML file: - kubectl apply -f https://k8s.io/docs/tasks/run-application/deployment-scale.yaml + kubectl apply -f https://k8s.io/docs/tasks/run-application/deployment-scale.yaml 1. Verify that the Deployment has four pods: - kubectl get pods -l app=nginx + kubectl get pods -l app=nginx The output is similar to this: