51/100 Execute Rolling Updates in Kubernetes

An application currently running on the Kubernetes cluster employs the nginx web server. The Nautilus application development team has introduced some recent changes that need deployment. They've crafted an image nginx:1.19 with the latest updates.

Execute a rolling update for this application, integrating the nginx:1.18 image. The deployment is named nginx-deployment.

Ensure all pods are operational post-update.

thor@jumphost ~$ kubectl get deployments
NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   3/3     3            3           16s
thor@jumphost ~$ kubectl get pods
NAME                               READY   STATUS    RESTARTS   AGE
nginx-deployment-989f57c54-7r2gs   1/1     Running   0          26s
nginx-deployment-989f57c54-c5jmq   1/1     Running   0          26s
nginx-deployment-989f57c54-lhg7b   1/1     Running   0          26s
thor@jumphost ~$ kubectl set image deployment nginx-deployment nginx-container=nginx:1.18
deployment.apps/nginx-deployment image updated
thor@jumphost ~$ kubectl get pods
NAME                                READY   STATUS    RESTARTS   AGE
nginx-deployment-58cf54c7f6-lf6ft   1/1     Running   0          22s
nginx-deployment-58cf54c7f6-r94hk   1/1     Running   0          15s
nginx-deployment-58cf54c7f6-tkd8x   1/1     Running   0          13s
thor@jumphost ~$ kubectl get deployments
NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   3/3     3            3           103s
thor@jumphost ~$ kubectl rollout status deployment nginx-deployment
deployment "nginx-deployment" successfully rolled out