Loading video player...
☸️ Day 50: Set Resource Limits in Kubernetes Pods | 100 Days of DevOps Welcome to Day 50 of the 100 Days of DevOps series! In this lab, you’ll create a Kubernetes Pod with CPU and memory resource requests and limits to control resource usage efficiently. 📌 Lab Objective: Deploy a Pod with defined CPU and memory requests/limits for better workload management. 🛠️ Task Requirements: Pod Name: httpd-pod Container Name: httpd-container Image: httpd Resource Configuration Requests Memory: 15Mi CPU: 100m Limits Memory: 20Mi CPU: 100m 💻 Step-by-Step Solution: 🔹 1. Create YAML File vi pod.yaml 🔹 2. Add Pod Configuration apiVersion: v1 kind: Pod metadata: name: httpd-pod spec: containers: - name: httpd-container image: httpd:latest resources: requests: memory: "15Mi" cpu: "100m" limits: memory: "20Mi" cpu: "100m" 🔹 3. Deploy Pod kubectl apply -f pod.yaml 🔹 4. Verify Pod kubectl get pods 🔹 5. Verify Resource Limits kubectl describe pod httpd-pod 👉 Check: Limits: cpu: 100m memory: 20Mi Requests: cpu: 100m memory: 15Mi 🔍 Expected Outcome: ✅ Pod httpd-pod running successfully ✅ Container httpd-container created ✅ Resource requests applied ✅ Resource limits enforced 📚 What You’ll Learn: Kubernetes resource management CPU and memory requests vs limits Writing Kubernetes YAML manifests Preventing resource overconsumption Kubernetes Pod configuration basics 🌟 Why This Lab Matters: Resource limits help maintain cluster stability and prevent applications from consuming excessive CPU or memory. 🎯 Series: 100 Days of DevOps Continue mastering Kubernetes and cloud-native technologies step by step. 🔔 Follow OtterTech for more practical Kubernetes and DevOps tutorials! #Kubernetes #K8s #DevOps #Containers #ResourceLimits #CloudNative #Kubectl #Docker #100DaysOfDevOps #OtterTech #Day50