Kubernetes Pod Resource Limiting Guide

Set Resource Limits in Kubernetes Pods
How to Define Resource Restrictions for Kubernetes Pods
Steps
- Create a pod named - httpd-podwith a container named- httpd-container.
- Use the - httpdimage with the- latesttag (- httpd:latest).
- Set resource requests: - Memory: - 15Mi
- CPU: - 100m
 
- Set resource limits: - Memory: - 20Mi
- CPU: - 100m
 
Tasks
- Create a manifest yaml file, - httpd-pod.yaml- 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"- As I prefer EOF,  
- Apply the manifest file - kubectl apply -f httpd-pod.yaml 
- pod/httpd-podcreated. Now, Verify the Pod.- kubectl get pods 
- Then, check the resources on given pod - kubectl describe pod httpd-pod 
#k8s #kubernetes #devops #pods #limitation #happylearning