From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Creating a deployment

Creating a deployment

- So in the next task you are going to create a deployment with the name updates using the Nginx 1.17 image, three replicas and the label type is prod. Ensure that while updating the deployment, a rolling update is used with the maxSurge parameter set to 50% and the maxAvailable parameter also set to 50% and update the deployment to run the latest version of the Nginx image. And after doing so, roll back the deployment update. Let's check it out. Okay, so let me use kubectl create deploy updates - -image=nginx:1.17 --replicas=3 and we need a label type is prod. We need to do that later. So let me pass by the yaml file. - -dry-run=client -o yaml > task6.yaml So I'm editing my task6.yaml. And there to start with we can use the labels. So type:prod. And then we need the strategy in the deployment spec. Probably the best way to get there is by having a look at the browser and search for maxsurge. That surge is specific enough to be likely to give us directly what we need to see. So here…

Contents