Rollout history not updating correctly

Hi All,

I performed rollout as per demo lecture in k8s beginner, used below commands.
but history not updating as expected,
– kubectl apply -f ymal/deployment.yml
– kubectl set image deployment.apps/myapp-deployment nginx-container=nginx:latest

[email protected]:~# kubectl set image deployment.apps/myapp-deployment nginx-container=nginx:latest
deployment.apps/myapp-deployment image updated
[email protected]:~# kubectl rollout history deployment.apps/myapp-deployment
deployment.apps/myapp-deployment
REVISION CHANGE-CAUSE
1 kubectl create --filename=ymal/deployment.yml --record=true
2 kubectl create --filename=ymal/deployment.yml --record=true
3 kubectl create --filename=ymal/deployment.yml --record=true

You have to add --record to your kubectl commands

1 Like