Whats the difference between a resource limit and a resource max in Limit Range? And request vs min?

7/27/2018

LimitRange allows us to configure these properties per resource (memory, CPU):

  • Limit: default maximum ammount of the resource that will be provisioned.
  • Request: default initial ammount of the resource that will be provisioned.

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?

-- codependent
kubernetes

1 Answer

7/27/2018

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.

-- codependent
Source: StackOverflow