<p>Say I have resource requests and limits set to</p>
<pre><code>resources:
  requests:
    cpu: &quot;100m&quot;
    memory: &quot;512Mi&quot;
  limits:
    cpu: &quot;500m&quot;
    memory: &quot;1024Mi&quot;
</code></pre>
<p>and <code>targetCPUUtilizationPercentage</code> set to 80,</p>
<p>so when more than 80m of CPU is utilized by pods on average, it will auto-scale.</p>
<p>So, what i want to understand is that the resource limit in this case will be useless, right? Or, does it play any role?</p>

Zain
<p>As Zerkms has said the resource limit is per container.</p>
<p>Something else to note: the resource limit will be used for Kubernetes to evict pods and for assigning pods to nodes. For example if it is set to 1024Mi and it consumes 1100Mi, Kubernetes knows it may evict that pod.</p>
<p>If the HPA plus the current scaling metric criteria are met and Kubernetes is supposed to scale up the replicaset it will check the memory of the nodes and the memory requests of the pods before scheduling a pod for a node.</p>
