0% found this document useful (0 votes)
24 views1 page

A-Note On Default Resource Requirements and Limits

Uploaded by

dandaniel3000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

A-Note On Default Resource Requirements and Limits

Uploaded by

dandaniel3000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Note on default resource requirements

and limits
In the previous lecture, I said – “When a pod is created the containers are assigned a
default CPU request of .5 and memory of 256Mi”. For the POD to pick up those
defaults you must have first set those as default values for request and limit by creating
a LimitRange in that namespace.

apiVersion: v1
kind: LimitRange
metadata:
name: mem-limit-range
spec:
limits:
- default:
memory: 512Mi
defaultRequest:
memory: 256Mi
type: Container

https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-
namespace/

apiVersion: v1
kind: LimitRange
metadata:
name: cpu-limit-range
spec:
limits:
- default:
cpu: 1
defaultRequest:
cpu: 0.5
type: Container

https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-default-
namespace/

References:

https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource

You might also like