Which are the best tools to record memory and CPU usage with Kubernetes?

254 views Asked by At

Initially we have used docker containers and ansible for deploying our containers. Now the management has suggested to use Kubernetes (cri-o) for the same deployment. Earlier we have used docker stats and top commands to get the statistics of CPU and memory usage. Can we get the same stats in Kubernetes? Do we have any tool which will give CPU and memory usage like PRTG or Prometheus ? Do we have any sensors for PRTG for kubernetes ? I am new to this, Can someone help me on this please.

1

There are 1 answers

0
Subramanian Manickam On

You can deploy metrics-server on to your existing kubernetes cluster. It is a cluster wide aggregator of resource usage of data.

You can download the below tar file and deploy the metrics server as pod on existing kubernetes cluster.

curl -O https://github.com/kubernetes-incubator/metrics-server/archive/v0.3.4.tar.gz
tar -xzf v0.3.4.tar.gz
kubectl apply -f metrics-server-0.3.4/deploy/1.8+/

Then if you run kubectl top command, you can see the cpu/memory usages details.

 Example:
   kubectl top nodes
   kubectl top pods