How to check k8s deploy history?

Viewed 18258
1 Answers

Use --record while creating the deployment so that it will start recroding the deployment into the ReplicaSet.

$ kubectl create -f deploy.yaml --record=true

Whenever you deploy new version of deployment, the replica set preserves the previous configuration of the deployment. Check the track of deployment and even we can use this for automation. This should be the default option in the kuberentes deployment, but, by default it's set to false.

Then check the status and history using the below commands,

$ kubectl rollout status deploy myapp-deployment
$ kubectl rollout history deploy myapp-deployment

Hope this helps.

Related