<p>It may sound like a naive question, I am running some load testing on one of the deployments on k8s. So to get an idea of the CPU utilization, I opened LENS HPA and CPU utilization is being shown like this</p>
<p><a href="https://i.stack.imgur.com/8SHmR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8SHmR.png" alt="enter image description here" /></a></p>
<p>can anyone please tell me how to understand this number, earlier it was 380/50% for CPU.</p>
<p>I just want to get an idea of what does this number means, if it is 380/50, is my CPU not big enough?</p>

iron_man83
<p>It means probably the same as the output from the <code>kubectl describe hpa {hpa-name}:</code></p>
<pre><code>$ kubectl describe hpa php-apache
Name:                                                  php-apache
...
Metrics:                                               ( current / target )
  resource cpu on pods  (as a percentage of request):  60% (120m) / 50%
</code></pre>
<p>It means that CPU has consumption increased to to x % of the request - <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#increase-load" rel="nofollow noreferrer">good example and explanation in the Kubernetes docs</a>:</p>
<blockquote>
<p>Within a minute or so, you should see the higher CPU load; for example:</p>
<pre><code>NAME         REFERENCE                     TARGET      MINPODS   MAXPODS   REPLICAS   AGE
php-apache   Deployment/php-apache/scale   305% / 50%  1         10        1          3m

</code></pre>
<p>and then, more replicas. For example:</p>
<pre><code>NAME         REFERENCE                     TARGET      MINPODS   MAXPODS   REPLICAS   AGE
php-apache   Deployment/php-apache/scale   305% / 50%  1         10        7          3m

</code></pre>
<p>Here, CPU consumption has increased to 305% of the request.</p>
</blockquote>
<p>So in your example <strong>(380%/50%)</strong> it means that you setup HPA to maintain an average CPU utilization across pods to <strong>50%</strong> (by increasing and decreasing number of replicas - updating the deployment) and CPU consumption has increased to <strong>380%</strong> so the deployment will be resized automatically.</p>
<p>Also check:</p>
<ul>
<li><a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">Horizontal Pod Autoscaling</a></li>
<li><a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/" rel="nofollow noreferrer">HorizontalPodAutoscaler Walkthrough</a></li>
</ul>
