CKAD Lightening Lab-1

nginx-deploy deployment validation doesn’t seem to correct to me. I did exactly same step that the solution provides but the first validation of creating deployment is not correct rest of other three validation are correct, which is a bit interesting. has anyone came across this issue in the past and what could be the reason? even though I copy paste the steps provided from solution, but still failing at the same validation part?

I just tried the problem, and it validated for me. Things to check in your solution:

  • You should use --dry-run=client -o yaml to create a file for the deployment with nginx:1.16
  • Editing that file, you’ll need to explicitly set the strategy (k explain deploy.spec.strategy is helpful for the syntax); verify the container has the right name (it will).
  • Run k apply -f YOUR-FILE
  • Wait for it to fully deploy
  • Update the image using k set image
  • Wait again for deployment
  • Roll it back with k rollout undo...

The most likely thing to get wrong is the strategy, either because you didn’t add it, or because the default value of strategy: {} is lower in the file than the block you added.