<p>I would like to know what resources are available in the entire K8s cluster that I am using. </p>

<p>To be clear, I am not talking about the <a href="https://kubernetes.io/docs/concepts/policy/resource-quotas/" rel="nofollow noreferrer">Resource Quotas</a>, because those only define resources per namespace. I would like to know what the capabilities of the entire cluster are (memory, cpu,...). Please note that the sum of all resource quotas is not equal to the capabilities of the cluster. The sum can be greater (creates race condition for resources between namespaces) or smaller (cluster not used to its fullest potential) than the resources of the cluster. </p>

<p>Can I use kubectl to answer this query? </p>

<p>You can use <code>kubectl top</code> command to check the memory and CPU consumption of all the nodes or pods.</p>

<pre><code>kubectl top nodes
</code></pre>

<p>For more information you can do, </p>

<pre><code>kubectl top -h
</code></pre>

<p>For kubectl top command to work, you need to install <code>metrics-server</code> in kubernetes cluster to fetch the CPU and memory metrics. </p>
