0
0
Kubernetesdevops~30 mins

Deployment status and history in Kubernetes - Mini Project: Build & Apply

Choose your learning style9 modes available
Deployment status and history
📖 Scenario: You are managing a Kubernetes cluster where you deploy applications using Deployments. You want to check the current status of your deployment and review its update history to ensure everything is running smoothly.
🎯 Goal: Learn how to check the status of a Kubernetes Deployment and view its rollout history using kubectl commands.
📋 What You'll Learn
Use kubectl commands to check deployment status
Use kubectl rollout history to view deployment history
Understand how to interpret deployment status output
💡 Why This Matters
🌍 Real World
Kubernetes Deployments are used to manage application updates safely and reliably in production environments.
💼 Career
Knowing how to check deployment status and history is essential for DevOps engineers and site reliability engineers to maintain application uptime and troubleshoot issues.
Progress0 / 4 steps
1
Create a Deployment YAML file
Create a file named nginx-deployment.yaml with a Deployment manifest for an nginx application with 2 replicas and image nginx:1.21.
Kubernetes
Need a hint?

Use the Deployment kind and specify replicas and container image exactly as shown.

2
Apply the Deployment to the cluster
Use the command kubectl apply -f nginx-deployment.yaml to create the Deployment in your Kubernetes cluster.
Kubernetes
Need a hint?

Use kubectl apply -f nginx-deployment.yaml to create the deployment.

3
Check the Deployment status
Use the command kubectl rollout status deployment/nginx-deployment to check the rollout status of the Deployment.
Kubernetes
Need a hint?

Use kubectl rollout status deployment/nginx-deployment to see if the deployment is complete.

4
View the Deployment rollout history
Use the command kubectl rollout history deployment/nginx-deployment to view the rollout history of the Deployment.
Kubernetes
Need a hint?

Use kubectl rollout history deployment/nginx-deployment to see past revisions.