Skip to content

Commit 3b4d3a0

Browse files
authored
Merge pull request #52999 from ramalabeysekera/fix_52124
Fix CHANGE-CAUSE output examples in Deployment docs
2 parents 067af4f + bd00633 commit 3b4d3a0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,20 @@ Follow the steps given below to check the rollout history:
503503
```
504504
deployments "nginx-deployment"
505505
REVISION CHANGE-CAUSE
506-
1 kubectl apply --filename=https://k8s.io/examples/controllers/nginx-deployment.yaml
507-
2 kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
508-
3 kubectl set image deployment/nginx-deployment nginx=nginx:1.161
506+
1 <none>
507+
2 <none>
508+
3 <none>
509509
```
510510

511511
`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:
512512

513513
* Annotating the Deployment with `kubectl annotate deployment/nginx-deployment kubernetes.io/change-cause="image updated to 1.16.1"`
514514
* Manually editing the manifest of the resource.
515+
* Using tooling that sets the annotation automatically.
516+
517+
{{< note >}}
518+
In older versions of Kubernetes, you could use the `--record` flag with kubectl commands to automatically populate the `CHANGE-CAUSE` field. This flag is deprecated and will be removed in a future release.
519+
{{< /note >}}
515520

516521
2. To see the details of each revision, run:
517522
```shell
@@ -523,7 +528,6 @@ Follow the steps given below to check the rollout history:
523528
deployments "nginx-deployment" revision 2
524529
Labels: app=nginx
525530
pod-template-hash=1159050644
526-
Annotations: kubernetes.io/change-cause=kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
527531
Containers:
528532
nginx:
529533
Image: nginx:1.16.1
@@ -584,7 +588,6 @@ Follow the steps given below to rollback the Deployment from the current version
584588
CreationTimestamp: Sun, 02 Sep 2018 18:17:55 -0500
585589
Labels: app=nginx
586590
Annotations: deployment.kubernetes.io/revision=4
587-
kubernetes.io/change-cause=kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
588591
Selector: app=nginx
589592
Replicas: 3 desired | 3 updated | 3 total | 3 available | 0 unavailable
590593
StrategyType: RollingUpdate

0 commit comments

Comments
 (0)