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.
当你在一个pod上给一个容器指定资源的request
的时候,调度程序会根据这个信息决定这个pod放到那个node上,当为container指定资源的limit
的时候,kublet会强制不让运行的container使用超过这个资源的限制,kubelet至少保留资源的 requests的大小的资源使容器得以运行