Kubernetes, requests & limits

Kubernetes, requests & limits

In Kubernetes, requests and limits are configurations used to manage the CPU and memory resources allocated to containers within a pod.

#Requests

The amount of CPU and memory that Kubernetes guarantees to a container.

If a container requests a certain amount of resources, Kubernetes ensures that those resources are available to it.

If a pod specifies a CPU request of 500m (which means 0.5 CPU cores) and a memory request of 256Mi, it will be scheduled on a node that has at least these resources available.

#Limits

The maximum amount of CPU and memory that a container can use.

If the container exceeds these limits, it may be throttled or terminated (in the case of memory).

If a pod sets a CPU limit of 1 (1 CPU core) and a memory limit of 512Mi, it can use up to that amount, but not exceed it.

https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

要查看或添加评论,请登录

社区洞察

其他会员也浏览了