• Hello, Am unable to understand what’s wrong with my answer for lightning lab-1, qn5. While evaluating, it shows error in step: Deployment created correctly?. All other steps are evaluated as right. checked the solution video as well and it seems similar to mine. Attaching the yaml file
If u are asking about the Q4 of the CKA, try
kubectl create deployment nginx-deploy --image=nginx:1.16
kubectl set image deployment/nginx-deploy nginx=nginx:1.17 --record
My qn is on the lightning lab q5 for CKAD
in the previous screenshot, right?
your screenshot is not from the ckad lightning lab
I meant this one
First you have to create the deployment using this yaml file
- image: nginx:1.16
When creating you have to use —record then you can set the image by the same option
kubectl create -f filename —record kubectl set image deployment nginx-deploy nginx=nginx:1.17 --record
To rollback to the previous state you can simply rollout undo using
$kubectl rollout undo deployment nginx-deploy
Thanks. Figured out what was wrong with my yaml by comparing with yours. I added a strategy section on my own with params but forgot to delete the default strategy section!