Verifying a Deployment

This recipe will take you through the instructions to verify the status of the Deployment and troubleshoot it if needed.

Let's perform the following steps:

  1. Confirm that the Deployment status shows a successfully rolled out message by watching the rollout status:
$ kubectl rollout status deployment nginx-deployment
deployment "nginx-deployment" successfully rolled out

  1. Verify that the number of DESIRED and CURRENT values is equal, in our case 2:
$ kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
nginx-deployment 2 2 2 2 2m40s
  1. Finally, also check the ReplicaSets (rs) and pods deployed as part of the Deployment:
$ kubectl get rs,pods
NAME DESIRED CURRENT READY AGE
nginx-deployment-5c689d88bb 2 2 2 28m
NAME READY STATUS RESTARTS AGE
nginx-deployment-5c689d88bb-r2pp9 1/1 Running 0 28m
nginx-deployment-5c689d88bb-xsc5f 1/1 Running 0 28m

Now you have verified that the new Deployment is successfully deployed and running. In a production environment, you will also need to edit, update, and scale an existing application. In the next recipe, you will learn how to perform these modify operations on an existing Deployment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.59.219