Reputation: 863
If my pod is exceeding the memory requested (but still under the limit) is more memory available at runtime on request or does the pod needs to restarts to allocate more memory?
Upvotes: 1
Views: 131
Reputation: 5267
There is no need to restart pod in order to allocate more memory. This happens automatically. However, you need to remember about two values: request
and limit
. Request
is used when creating pod. The node must have enough memory (the number specified by request
) for it to be created. It is also the minimum amount of memory that must be available for a given pod. The limit
, on the other hand, is the maximum amount of memory that a given pod can use. The amount of memory between the request
and the limit
is allocated based on the resources available on the node. You can read more about it here.
Upvotes: 0
Reputation: 34924
Memory up to the limit is available to the pod (as long as the host has enough free) at all times. The "request" amount is used for scheduling, and the limit is used for actually restricting the pod to an amount. I would caution against setting too high of a gap between request and limit, as it can result in the node itself exhausting memory.
Upvotes: 1