Dev
Dev

Reputation: 1

Ways to get CPU and memory info in k8s

I'm trying to find all the ways that I can get the CPU and memory usage info in kubernetes. And based on that decide as to which one is the most efficient way of doing it. Collecting this stats during the orchestrator survey phase, using kube/container primitives. Any pointers will be appreciated. Thank you.

Upvotes: 0

Views: 582

Answers (1)

Harsh Manvar
Harsh Manvar

Reputation: 30083

Kubernetes uses the metrics server for resource monitoring. The metrics server will show you the CPU and Memory but it won't store it anywhere.

So You won't be able to store & get the historical data in the metrics server.

Installation : https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.html

Repo : https://github.com/kubernetes-sigs/metrics-server

Prometheus & Grafana

You can also use Prometheus & Grafana for monitoring. Prometheus will scrape the metrics and you can show it inside the Grafana dashboard.

https://prometheus.io/docs/visualization/grafana/

There is other also various tools available like :

  • New relics
  • Datadog
  • Cloud watch AWS
  • GCP stack driver & monitoring

Upvotes: 2

Related Questions