<p>Let us assume kubernetes cluster with one worker node (1core and 256MB RAM). all pods will be scheduled in worker node.</p>

<p>At first i deployed a pod with config (request: cpu 0.4, limit: cpu 0.8), it deployed successfully. as the machine has 1 core free it took 0.8 cpu</p>

<p>Can i able to deploy another pod with same config? If yes will first pod's cpu reduce to 0.4?</p>

<p>Resource requests and limits are considered in two different places.</p>

<p>Requests are only considered when scheduling a pod.  If you're scheduling two pods that each request 0.4 CPU on a node that has 1.0 CPU, then they fit and could both be scheduled there (along with other pods requesting up to a total of 0.2 CPU more).</p>

<p>Limits throttle CPU utilization, but are also subject to the actual physical limits of the node.  If one pod tries to use 1.0 CPU but its pod spec limits it to 0.8 CPU, it will get throttled.  If two of these pods run on the same hypothetical node with only 1 actual CPU, they will be subject to the kernel scheduling policy and in practice will probably each get about 0.5 CPU.</p>

<p>(Memory follows the same basic model, except that if a pod exceeds its limits or if the total combined memory used on a node exceeds what's available, the pod will get OOM-killed.  If your node has 256 MB RAM, and each pod has a memory request of 96 MB and limit of 192 MB, they can both get scheduled [192 MB requested memory fits] but could get killed if either one individually allocates more than 192 MB RAM [its own limit] or if the total memory used by all Kubernetes and non-Kubernetes processes on that node goes over the physical memory limit.)</p>
