Question 7: Lightening lab: Create a new deployment called `nginx-deploy`, with . . .

Samir:
Question 7: Lightening lab:

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.

How can I record the upgrade in the resource annotation?

Mayur Sharma:

  1. Create deployment
kubectl create deployment nginx-deploy --image=nginx:1.16 
  1. Upgrade it
kubectl set image deployment nginx-deploy <name of container>=nginx:1.17 --record
  1. Check the status,
kubectl rollout status deployment nginx-deploy
kubectl rollout history deployment nginx-deploy

Apaar Sharma:
K edit deploy nginx-deploy --record is what i use because i don’t like remembering a lot of commands . But you can also use kubectl set image deployment/nginx-deploy <container-name>=nginx:1.17 --record

Samir:
ohhh i have forgotten the --record flag

Samir:
Thank you guys. I am realy becoming a good feeling