LimitRange allows us to configure these properties per resource (memory, CPU):
However I just realized there are two other options, min and max. Since min/max seem to overlap with request/limit, what the difference between all these properties?
Requests and LimitsRequests are what the container is guaranteed to get. If a container requests a resource, Kubernetes will only schedule it on a node that can give it that resource. Limits, on the other hand, make sure a container never goes above a certain value.
Resource limit means the maximum combined value of all resources an individual can have an ownership interest in and still qualify for medicaid.
What if you specify a container's limit, but not its request? The output shows that the container's memory request is set to match its memory limit.
By default, containers run with unbounded compute resources on a Kubernetes cluster. Using Kubernetes resource quotas, administrators (also termed cluster operators) can restrict consumption and creation of cluster resources (such as CPU time, memory, and persistent storage) within a specified namespace.
I found the answer digging in the docs. Limit and Request params are overridable by the pod configurations. Min and Max enforce the values configured in the LimitRange:
Motivation for minimum and maximum memory constraints
As a cluster administrator, you might want to impose restrictions on the amount of memory that Pods can use. For example:
Each Node in a cluster has 2 GB of memory. You do not want to accept any Pod that requests more than 2 GB of memory, because no Node in the cluster can support the request.
A cluster is shared by your production and development departments. You want to allow production workloads to consume up to 8 GB of memory, but you want development workloads to be limited to 512 MB. You create separate namespaces for production and development, and you apply memory constraints to each namespace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With