Skip to content

Commit 8890ac3

Browse files
authored
Merge pull request #29593 from vaibhav2107/record-deployment
Remove the --record flag in https://kubernetes.io/docs/concepts/workloads/controllers/deployment.md
2 parents 5b373f5 + f6c813d commit 8890ac3

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

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

Lines changed: 8 additions & 14 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,15 +480,14 @@ 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:
494489

495490
* Annotating the Deployment with `kubectl annotate deployment.v1.apps/nginx-deployment kubernetes.io/change-cause="image updated to 1.16.1"`
496-
* Append the `--record` flag to save the `kubectl` command that is making changes to the resource.
497491
* Manually editing the manifest of the resource.
498492

499493
2. To see the details of each revision, run:
@@ -506,7 +500,7 @@ Follow the steps given below to check the rollout history:
506500
deployments "nginx-deployment" revision 2
507501
Labels: app=nginx
508502
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
503+
Annotations: kubernetes.io/change-cause=kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1
510504
Containers:
511505
nginx:
512506
Image: nginx:1.16.1
@@ -567,7 +561,7 @@ Follow the steps given below to rollback the Deployment from the current version
567561
CreationTimestamp: Sun, 02 Sep 2018 18:17:55 -0500
568562
Labels: app=nginx
569563
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
564+
kubernetes.io/change-cause=kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1
571565
Selector: app=nginx
572566
Replicas: 3 desired | 3 updated | 3 total | 3 available | 0 unavailable
573567
StrategyType: RollingUpdate

0 commit comments

Comments
 (0)