Deepak Ladwa:
@Tej_Singh_Rana
with the latest k82 version, Is there any way to record the version during the initial deployment creation ?
Mohamed Ayman:
check the following steps:
kubectl create deployment nginx-deploy --image=nginx:1.16 --replicas=1
kubectl get deploy
kubectl set image deployment nginx-deploy nginx=nginx:1.17 --record
kubectl rollout history deployment nginx-deploy
Raj:
I believe this won’t record the initial image version i.e 1.16 in the rollout history but will tell that new images was upgraded to version 1.17
Deepak Ladwa:
Yes, for the initial deployment creation, --record option is not supported. It is supported only with set image option
Raj:
Is there a way if to maintain what initial version it was on ?
Ali Yussuf:
k create deploy nginx-deploy --image=nginx:1.16 --dry-run=client -o yaml > nginx-deploy.yaml
k apply -f nginx-deploy.yaml --record
k set image deploy nginx-deploy nginx=nginx:1.17 --record
k rollout history deploy nginx-deploy
deployment.apps/nginx-deploy
REVISION CHANGE-CAUSE
1 kubectl apply --filename=nginx-deploy.yaml --record=true
2 kubectl set image deploy nginx-deploy nginx=nginx:1.17 --record=true