Kubernetes 101 : Default resource limits and requests - LimitRange -
To keep the pods that don't have a resource limits/requests defined from consuming all the resources, we can specify default resource limits/requests for a specific namespace.
All the pods within that namespace that don't have resource limits/ requests defined will use the default ones.
We could define these resource limits/requests using the LimitRange object.
We would first need to check if the LimitRanger admission controller is enabled.
We could also enable it using the below:
Below is the Yaml file of our LimitRange object with default resource limits/requests for CPU and RAM:
The we create our LimitRange in the "ns_1" namespace:
Comments