<p>I've been reading the kubernetes documentation <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container" rel="noreferrer">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container</a> </p>

<p>But it's still not clear for me what's the difference between <code>spec.containers[].resources.limits.cpu</code> and <code>spec.containers[].resources.requests.cpu</code> and what's the impact on the resource limitation</p>

<p>Can you please suggest some reads or books where this is explained in common english?  </p>

<p>Thanks in advance</p>

<p>When Kubernetes pod is scheduled on a particular node it is required the pod to have enough resources to run. Kubernetes knows resources of it's node but how does kubernetes knows the how much resources will pod takes beforehand to schedule it effectively in nodes. For that <code>requests</code> will be used. When we specify a <code>request</code> of resource kubernetes will guarantee that pod will get that amount of resource. </p>

<p>On other hand <code>limit</code> limits the resource usage by a pod. Kubernetes will not allow a pod to take more resources than the <code>limit</code>. When it comes to CPU if you request more kubernetes will throttle pods CPU artificially. If pod exceed a <code>limit</code> pod will be it will be terminated. To make it simple it simple <code>limit</code> is always bigger than <code>request</code>.</p>

<p>This example will give you idea about <code>request</code> and <code>limit</code>. Think that there is a pod where you have specify its memory request as 7GB and memory limit as 10GB. There are three nodes in your cluster where node1 has 2GB of memory, node2 has 8GB memory and node3 has 16GB. Your pod will never be scheduled on node1. But it will either be sceduled on node2 or node3 depending on pod current memory usage. But if it is scheduled on node3 it will be terminated in any scenario it will exceed the memory usage of 10GB.</p>
