<p>How to modify the promql query to get the sum of all the pods (replicas) CPU usage belonging to one particular service?</p>
<p>To get the CPU usage of a single pod I use the following query :</p>
<pre><code>rate(container_cpu_usage_seconds_total{pod=&quot;pod name&quot;,container=&quot;container name&quot;}[5m]) by (container)
</code></pre>
<p>How can I modify this?</p>

jkmp
<p>You can use <code>sum(rate(container_cpu_usage_seconds_total{pod=&quot;pod name&quot;,container=&quot;container name&quot;}[5m])) by (container)</code> to get the sum of all the pods (replicas) CPU usage belonging to one particular service.</p>
