Kubernetes 101 : Containers resources - Limits and Requests -

kubernetes uses resource requests and limits to manage the resources allocated to pods (CPU, memory, ...)
The requested resource is what a pod is guaranteed to get.

Kubernetes does the scheduling of the pod on the nodes also based on the limits. The limit is a cap over which a pod is not allowed to go in terms of resource consumption.


Limits and requests are done at the container level inside the pod's Yaml configuration file:

The limits and requests are used by the kubernetes scheduler to pick the adequate node for an application

Mi: megabyte
m : milli-core
1000m : one CPU core

We then create our pod using the above command:


If a container goes beyond the memory limit, it will be stopped, but if it tries to go beyond CPU core count, kubernetes will not allow it to do so, but it will not stop that container.


Leave as a comment: