<p>Is there a way to get <code>top pods</code> filtered by node?</p>

<p>Use case: I have a node which is reported to use 103% of the cpu and I want to validate which pods are causing it.</p>

<p>I don't think there is direct way to do it with <code>kubectl top pods</code> command since the only option to filter is label/selector which apply to pod only.</p>
<p>For your use case, you can use the command:</p>
<pre><code>kubectl get pods -o wide | grep &lt;node&gt; | awk {'print $1'} | xargs -n1 command kubectl top pods  --no-headers
</code></pre>
<ul>
<li><code>kubectl get pods -o wide</code>: display pods with their associated node information</li>
<li><code>grep &lt;node&gt;</code>: let you filter pod located on a specific node</li>
<li><code>awk {'print $1'}</code>: print the first column (name of the pods)</li>
<li><code>xargs -n1 command kubectl top pods --no-headers</code>: execute the top command for each pod without the headers (NAME, CPU, MEMORY)</li>
</ul>
<p>Additionally, you can check the limits you've set for each pod in one specific node using the command <code>kubectl describe node &lt;node&gt;</code></p>
