Set Resource Limits in Kubernetes Pods
How to Define Resource Restrictions for Kubernetes Pods

Infosec Poet and CAP-certified DevOps/SecOps Engineer, passionate about security, creativity, and continuous learning.
Steps
Create a pod named
httpd-podwith a container namedhttpd-container.Use the
httpdimage with thelatesttag (httpd:latest).Set resource requests:
Memory:
15MiCPU:
100m
Set resource limits:
Memory:
20MiCPU:
100m
Tasks
Create a manifest yaml file,
httpd-pod.yamlapiVersion: 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





