<p>Do we have a simple command through which we can find the available resources at cluster level?</p>

<p>Available CPU and Memory requests.</p>

karthikeayan
<p>There are couple of ways to achieve this. You didn't mention what environment are you using, however you probably already have <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/resource-metrics-pipeline/#metrics-server" rel="noreferrer"><code>metric server</code></a> in your cluster.</p>
<p><strong>1. <code>Top</code> command</strong></p>
<p><code>kubectl top pods</code> or <code>kubectl top nodes</code>. This way you will be able to check current usage of pods/nodes. You can also narrow it to <code>namespace</code>.</p>
<p><strong>2. Describe node</strong></p>
<p>If you will execute <code>kubectl describe node</code>, in output you will be able to see Capacity of that node and how much allocated resources left. Similar with <code>Pods</code>.</p>
<pre><code>...
Capacity:
 attachable-volumes-gce-pd:  127
 cpu:                        1
 ephemeral-storage:          98868448Ki
 hugepages-2Mi:              0
 memory:                     3786684Ki
 pods:                       110
Allocatable:
 attachable-volumes-gce-pd:  127
 cpu:                        940m
 ephemeral-storage:          47093746742
 hugepages-2Mi:              0
 memory:                     2701244Ki
 pods:                       110
 ...
</code></pre>
<p><strong>3. Prometheus</strong></p>
<p>If you need more detailed information with statistics, I would recommend you to use <a href="https://prometheus.io/" rel="noreferrer"><code>Prometheus</code></a>. It will allow you to create statistics of nodes/pods, generate alerts and many more. It also might provide metrics not only CPU and Memory but also <code>custom.metrics</code> which can create statistics of all <code>Kubernetes</code> objects.</p>
<p>Many useful information can be found <a href="https://www.replex.io/blog/kubernetes-in-production-the-ultimate-guide-to-monitoring-resource-metrics" rel="noreferrer">here</a>.</p>
