From 9cc26cfe159f50ad610050c3facdb528d3d3221e Mon Sep 17 00:00:00 2001 From: Melony QIN Date: Wed, 9 Oct 2019 06:01:49 +0100 Subject: [PATCH] update set image command in a simpler way (#15817) * update set image command in a simpler way update set image command in a simpler way * fix indentation * Update deployment.md --- .../concepts/workloads/controllers/deployment.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content/en/docs/concepts/workloads/controllers/deployment.md b/content/en/docs/concepts/workloads/controllers/deployment.md index 2545ecd3ec..ac0bd5bf3c 100644 --- a/content/en/docs/concepts/workloads/controllers/deployment.md +++ b/content/en/docs/concepts/workloads/controllers/deployment.md @@ -158,18 +158,24 @@ Follow the steps given below to update your Deployment: ```shell kubectl --record deployment.apps/nginx-deployment set image deployment.v1.apps/nginx-deployment nginx=nginx:1.9.1 ``` - The output is similar to this: + or simply use the following command: + + ```shell + kubectl set image deployment/nginx-deployment nginx=nginx:1.91 --record + ``` + + The output is similar to this: ``` deployment.apps/nginx-deployment image updated ``` - Alternatively, you can `edit` the Deployment and change `.spec.template.spec.containers[0].image` from `nginx:1.7.9` to `nginx:1.9.1`: + Alternatively, you can `edit` the Deployment and change `.spec.template.spec.containers[0].image` from `nginx:1.7.9` to `nginx:1.9.1`: ```shell kubectl edit deployment.v1.apps/nginx-deployment ``` - The output is similar to this: + The output is similar to this: ``` deployment.apps/nginx-deployment edited ```