Container Limit Ranges

Refer to the official Kubernetes documentation: Limit Ranges

Using Kubernetes LimitRange as an admission controller is resource limitations at the container or Pod level. It sets default request values, limit values, and maximum values for containers or Pods created after the LimitRange is created or updated, while continuously monitoring container usage to ensure that no resources exceed the defined maximum values within the namespace.

The resource request of a container is the ratio between resource limits and cluster overcommitment. Resource request values serve as a reference and criterion for the scheduler when scheduling containers. The scheduler will check the available resources for each node (total resources - sum of resource requests of containers within Pods scheduled on the node). If the total resource requests of the new Pod container exceed the remaining available resources of the node, that Pod will not be scheduled on that node.

LimitRange is an admission controller:

  • It applies default request and limit values for all Containers that do not set compute resource requirements.
  • It tracks usage to ensure it does not exceed resource maximum and ratio defined in any LimitRange present in the namespace.

Includes the following configurations

ResourceField
CPU
  • Default Request
  • Limit
  • Max
Memory
  • Default Request
  • Limit
  • Max