Prometheus queries to get CPU and Memory usage in kubernetes pods

3/13/2019

I need to get CPU and Memory usage in kubernetes pods with prometheus queries. Can someone plz help?

-- GihanS
grafana
kubernetes
prometheus
promql

1 Answer

3/13/2019

Do you use prometheus-operator to collect data from kubernetes? If yes, you can use something like this: sum(container_memory_usage_bytes) sum(container_cpu_usage_seconds_total) Just for example.

-- Максим Штернберг
Source: StackOverflow