Prometheus-operator cannot get pod CPU/memory usage

10/12/2019

I installed Prometheus operator Helm chart on my k8s cluster. I had a look at Grafana and could see the node CPU and memory usage. However Prometheus doesn't manage to collect pod CPU/memory usage.
For instance sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name!=""}[5m])) would return no data.
kubectl top pod works fine so I cannot understand why Prometheus won't manage to get this data. Or is the rule above wrong perhaps?

I'm using:

  • Minikube 1.4.0
  • kvm2 driver
  • Kubernetes 1.15.4
  • Ubuntu 18.04.3
-- stackoverflowed
kubernetes
prometheus-operator

0 Answers