Hi All, I have a question about CKA Lightning Lab 1, question 4: Create a new de . . .

Andrei Zimin:
Hi All, I have a question about CKA Lightning Lab 1, question 4: Create a new deployment called nginx-deploy, with image nginx:1.16 and 1 replica. Next upgrade the deployment to version 1.17 using rolling update. Make sure that the version upgrade is recorded in the resource annotation. - I get a fail for the last part - “recording upgrade”. How can I do it?

Madhan Kumar:
kubectl set image deploy nginx-deploy nginx=nginx:1.16 --record
kubectl get deploy nginx-deploy -o yaml | grep -i -A1 annotations

Mohamed Ayman:
You can use --record when setting the image nginx:1.17
Check the following steps:

kubectl create deployment nginx-deploy --image=nginx:1.16 --replicas=1
kubectl get deploy

Mohamed Ayman:
Then

kubectl set image deployment nginx-deploy nginx=nginx:1.17 --record
kubectl rollout history deployment nginx-deploy

Andrei Zimin:
Thank you!!