Skip to content

Commit a0d63d1

Browse files
committed
1 parent 11ca5f0 commit a0d63d1

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

content/en/docs/concepts/workloads/controllers/deployment.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ Follow the steps given below to create the above Deployment:
7575
kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml
7676
```
7777

78-
{{< note >}}
79-
You can specify the `--record` flag to write the command executed in the resource annotation `kubernetes.io/change-cause`.
80-
The recorded change is useful for future introspection. For example, to see the commands executed in each Deployment revision.
81-
{{< /note >}}
82-
8378

8479
2. Run `kubectl get deployments` to check if the Deployment was created.
8580

@@ -169,13 +164,13 @@ Follow the steps given below to update your Deployment:
169164
1. Let's update the nginx Pods to use the `nginx:1.16.1` image instead of the `nginx:1.14.2` image.
170165

171166
```shell
172-
kubectl --record deployment.apps/nginx-deployment set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1
167+
kubectl deployment.apps/nginx-deployment set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1
173168
```
174169

175170
or use the following command:
176171

177172
```shell
178-
kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1 --record
173+
kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
179174
```
180175

181176
The output is similar to:
@@ -370,7 +365,7 @@ rolled back.
370365
* Suppose that you made a typo while updating the Deployment, by putting the image name as `nginx:1.161` instead of `nginx:1.16.1`:
371366

372367
```shell
373-
kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.161 --record=true
368+
kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.161
374369
```
375370

376371
The output is similar to this:
@@ -485,9 +480,9 @@ Follow the steps given below to check the rollout history:
485480
```
486481
deployments "nginx-deployment"
487482
REVISION CHANGE-CAUSE
488-
1 kubectl apply --filename=https://k8s.io/examples/controllers/nginx-deployment.yaml --record=true
489-
2 kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1 --record=true
490-
3 kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.161 --record=true
483+
1 kubectl apply --filename=https://k8s.io/examples/controllers/nginx-deployment.yaml
484+
2 kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1
485+
3 kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.161
491486
```
492487

493488
`CHANGE-CAUSE` is copied from the Deployment annotation `kubernetes.io/change-cause` to its revisions upon creation. You can specify the`CHANGE-CAUSE` message by:
@@ -506,7 +501,7 @@ Follow the steps given below to check the rollout history:
506501
deployments "nginx-deployment" revision 2
507502
Labels: app=nginx
508503
pod-template-hash=1159050644
509-
Annotations: kubernetes.io/change-cause=kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1 --record=true
504+
Annotations: kubernetes.io/change-cause=kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1
510505
Containers:
511506
nginx:
512507
Image: nginx:1.16.1
@@ -567,7 +562,7 @@ Follow the steps given below to rollback the Deployment from the current version
567562
CreationTimestamp: Sun, 02 Sep 2018 18:17:55 -0500
568563
Labels: app=nginx
569564
Annotations: deployment.kubernetes.io/revision=4
570-
kubernetes.io/change-cause=kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1 --record=true
565+
kubernetes.io/change-cause=kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1
571566
Selector: app=nginx
572567
Replicas: 3 desired | 3 updated | 3 total | 3 available | 0 unavailable
573568
StrategyType: RollingUpdate

0 commit comments

Comments
 (0)