When you specify a Pod, you can optionally specify how much of each resource a Container needs. The most common resources to specify are CPU and memory (RAM); there are others.
When you specify the resource request for Containers in a Pod, the scheduler uses this information to decide which node to place the Pod on. When you specify a resource limit for a Container, the kubelet enforces those limits so that the running container is not allowed to use more of that resource than the limit you set. The kubelet also reserves at least the request amount of that system resource specifically for that container to use.
當(dāng)你在一個pod上給一個容器指定資源的request
的時候嫂用,調(diào)度程序會根據(jù)這個信息決定這個pod放到那個node上子眶,當(dāng)為container指定資源的limit
的時候械媒,kublet會強(qiáng)制不讓運(yùn)行的container使用超過這個資源的限制疑苫,kubelet至少保留資源的 requests的大小的資源使容器得以運(yùn)行