To modify CHANGE-CAUSE, you can use the following methods:
1. kubectl annotate
$ kubectl annotate deployment/my-dep kubernetes.io/change-cause="my change cause"
This will add or update the kubernetes.io/change-cause annotation on the my-dep deployment.
2. kubectl edit
$ kubectl edit deployment/my-dep
This will open the deployment manifest in a text editor. You can then edit the kubernetes.io/change-cause annotation and save the file.
3. Update the deployment manifest
You can manually edit the deployment manifest to add or update the kubernetes.io/change-cause annotation.
Once you have modified the CHANGE-CAUSE, you can check the rollout history to see the updated change cause:
$ kubectl rollout history deploy/my-dep
Here is an example of a rollout history with a modified CHANGE-CAUSE:
deployment.apps/my-dep
REVISION CHANGE-CAUSE
3 <none>
4 <none>
5 my change cause
Note: The CHANGE-CAUSE annotation is copied to the deployment revisions upon creation. So, if you modify the CHANGE-CAUSE annotation on the deployment, the change will be reflected in the existing revisions as well.
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND