Course contentsShow
← Docker, Kubernetes & CI/CD
Lesson 275 of 8024. Kubernetes Architecture and Core ObjectsFree lesson

Monitoring Deployment Progress and Status

Use command-line tools to track the rollout status of a deployment and identify when updates are successfully completed or stalled.

In this lesson, you will learn how to use command-line tools to observe the real-time rollout progress of your Kubernetes deployments and identify when they have reached a stable state or become stalled.

Tracking Rollouts in Real-Time

When you trigger a rollout (such as updating a container image), Kubernetes manages the transition from your old configuration to the new one. Because this process happens asynchronously, you need a way to check if the deployment is still "in progress."

The most efficient way to track this status is by using the kubectl rollout status command. By pointing this command at your deployment, Kubernetes will report the progress of the update until it completes.

# Monitor the status of a specific deployment
kubectl rollout status deployment/my-web-app

When you run this, you will see output like Waiting for deployment "my-web-app" rollout to finish: 1 out of 3 new replicas have been updated... until the desired state is reached. If the update finishes successfully, it will report deployment "my-web-app" successfully rolled out.

Identifying Stalled Deployments

Sometimes, a deployment cannot reach completion. This might happen if your new pods fail their health probes (which we discussed in previous lessons) or if there are image pull errors.

If a rollout gets "stuck," kubectl rollout status will eventually time out or remain hanging. To investigate why a deployment isn't progressing, you should use:

# Check the status of the deployment object
kubectl get deployment my-web-app

Look at the UP-TO-DATE, AVAILABLE, and READY columns. If AVAILABLE is lower than your desired replica count, the controller is struggling to bring your new pods to a "Running and Ready" state. You can then use kubectl describe deployment my-web-app to look at the "Events" section at the bottom of the output, which often contains the specific reason why the control loop is failing to reconcile the desired state.

By combining rollout status for live updates and describe for deep-dive troubleshooting, you can maintain full visibility into your application’s lifecycle.

Key Takeaway: Use kubectl rollout status to watch progress in real-time, and rely on kubectl describe events to diagnose why a deployment might be stalled.