<p>I just ran</p>
<p><code>kubectl create deploy nginx --image=nginx:1.18.0 --replicas=2 --port=80</code></p>
<p>to create a deployment.</p>
<p>Then edited the image of that deployment</p>
<p><code>kubectl set image deploy nginx nginx=nginx:1.19.8</code></p>
<p>Then looked at its rollout history</p>
<p><code>kubectl rollout history deployment nginx</code></p>
<p>However, the change-cause column is always <code>&lt;none&gt;</code>.
From the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-back-a-deployment" rel="nofollow noreferrer">wiki</a>, I have understood that this should at least contain the command that was used to trigger the change.</p>
<p>I seem to be having the same issue as described <a href="https://github.com/kubernetes/kubernetes/issues/54014" rel="nofollow noreferrer">here</a>.
Except since then, <code>--record</code> has been deprecated. Looking at <a href="https://stackoverflow.com/questions/73814500/record-has-been-deprecated-then-what-is-the-alternative">this</a> question, there seem to be no alternatives.</p>
<p>What's going on with the change-cause field and why isn't it being filled the way the wiki says it will?</p>
<p>I am fully aware of the possibility of adding my own annotations, but I explicitly just want to know why the commands aren't being put into the change-cause field, as is claimed by the wiki.</p>

CC BY-SA 4.0
2024-03-28T13:17:08.803Z
Not k8s expert but from what I have researched the `set image` command doesn't automatically update that field. So it's designed that way
George Udosen
CC BY-SA 4.0
2024-03-29T11:38:27.757Z
@GeorgeUdosen Yeah, I guess. The problem is that these commands and their description are found on the wiki, which means it's simply written wrong.
Zimano
<kubernetes>
Kubernetes rollout deployment history CHANGE-CAUSE field is always <none>
Zimano
# Kubernetes rollout deployment history CHANGE-CAUSE field is always <none>

(Asked by: username_0 on 2024-03-27)

I just ran

`kubectl create deploy nginx --image=nginx:1.18.0 --replicas=2 --port=80`

to create a deployment.

Then edited the image of that deployment

`kubectl set image deploy nginx nginx=nginx:1.19.8`

Then looked at its rollout history

`kubectl rollout history deployment nginx`

However, the change-cause column is always .
From the [wiki](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-back-a-deployment), I have understood that this should at least contain the command that was used to trigger the change.

I seem to be having the same issue as described [here](https://github.com/kubernetes/kubernetes/issues/54014).
Except since then, `--record` has been deprecated. Looking at [this](https://stackoverflow.com/questions/73814500/record-has-been-deprecated-then-what-is-the-alternative) question, there seem to be no alternatives.

What's going on with the change-cause field and why isn't it being filled the way the wiki says it will?

I am fully aware of the possibility of adding my own annotations, but I explicitly just want to know why the commands aren't being put into the change-cause field, as is claimed by the wiki.

**Tags:** kubernetes

> **Comments:**
> **username_1**: Not k8s expert but from what I have researched the `set image` command doesn't automatically update that field. So it's designed that way  
> **username_0**: @GeorgeUdosen Yeah, I guess. The problem is that these commands and their description are found on the wiki, which means it's simply written wrong.  

---

## 0 answers

