Deployment as higher-level abstraction in Kubernetes
📖 Scenario: You are managing a simple web application that needs to run reliably on Kubernetes. Instead of creating Pods directly, you will use a Deployment to manage the Pods. This helps Kubernetes keep your app running smoothly even if some Pods fail.
🎯 Goal: Create a Kubernetes Deployment YAML file that runs an NGINX web server with 3 replicas. Then, update the Deployment to change the number of replicas. Finally, display the Deployment status using kubectl commands.
📋 What You'll Learn
Create a Deployment YAML file named
nginx-deployment.yaml with 3 replicasUse the
nginx:1.21 image for the containerAdd a label
app: nginx to the Deployment and Pod templateUpdate the Deployment to scale replicas from 3 to 5
Use
kubectl commands to apply the Deployment and check its status💡 Why This Matters
🌍 Real World
Deployments are used in real Kubernetes clusters to manage application Pods. They ensure your app stays running and can be updated without downtime.
💼 Career
Understanding Deployments is essential for DevOps engineers and site reliability engineers who manage containerized applications in production.
Progress0 / 4 steps