0

I have a Kubernetes cluster of around 18 nodes where few are with 4 cores and 16G RAM, and few are with 16 core and 64G RAM, and there are around 25-30 applications running on the cluster.

Each of the applications are configured with requests and limit parameter, around 2-3cores & 4-8G ram and allocated to each of the application.

Now how do I get the current utilization report saying how many cores/ram I am left within the current cluster? before deploying any new application.

I tried using the below commands:

kubectl top no;    kubectl describe no [node-name]

These are not giving me the exact no. of cores or ram I am left with.

Any leads to this will help a lot.

Note: I am using version 1.19 of Kubernetes.

programmerq
  • 6,262
  • 25
  • 40
Abhishek Anvekar
  • 338
  • 1
  • 5
  • 18
  • Does this answer your question? [Checking kubernetes pod CPU and memory](https://stackoverflow.com/questions/54531646/checking-kubernetes-pod-cpu-and-memory) – Pit Jul 15 '21 at 10:22

2 Answers2

0

You can use a kubectl plugin to view the resourses capacity, usage etc.

Here, are few related plugins.

You can use krew to install those plugins.

Emruz Hossain
  • 4,764
  • 18
  • 26
0

kubectl describe node <insert-node-name-here>

You should see something like this:

Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource                       Requests      Limits
  --------                       --------      ------
  cpu                            1130m (59%)   3750m (197%)
  memory                         4836Mi (90%)  7988Mi (148%)
  ephemeral-storage              0 (0%)        0 (0%)
  hugepages-1Gi                  0 (0%)        0 (0%)
  hugepages-2Mi                  0 (0%)        0 (0%)
  attachable-volumes-azure-disk  0             0
Ebbz
  • 193
  • 4