Day 51: Execute Rolling Updates in Kubernetes


I have created a k8s deployment with rollingUpdate but i still get an error that i have not performed rolling update. Sharing a screenshot for reference. it has my deployment file and description of the deployment. I have noticed that even though i have used nginx:1.18 image but after describing the deployment it shows nginx:1.16 as the image. i have tried the lab twice and both the times i am getting the same error.

Can you please take a look @ Inderpreet @ Vitor @ Tej-Singh-Rana

Hi @gv.avinash3

I’ve just checked it and it’s worked properly, please consider the my command and try it again:
kubectl set image deployment/nginx-deployment nginx-container=nginx:1.18

Thanks @raymond.baoly for the suggestion! Looks like i did not pay attention to the question. I misread the requirement and instead of making a rollingUpdate to the existing deployment i created a new deployment and hence this discrepancy.

The command you shared works! Also as an alternative we can directly edit the image in existing k8s deployment using the below command.:

kubectl edit deployment nginx-deployment