Kubernetes pod QoS class in Prometheus

5/28/2020

I would like to add one panel to my Grafana dashboard with the number of Best Effort, Burstable and Guaranteed pods.

I did this approach:

(kube_pod_status_phase{phase="Running"}==1) and on(pod,namespace) label_replace(container_memory_working_set_bytes{id=~".*burstable.*"} ,"pod","$1","pod_name","(.*)")

and

(kube_pod_status_phase{phase="Running"}==1) and on(pod,namespace) label_replace(container_memory_working_set_bytes{id=~".*burstable.*"} ,"pod","$1","pod_name","(.*)")

but I do not find the way to obtain the Guaranteed ones. The only approach I've got was:

(kube_pod_status_phase{phase="Running"}==1) and on(pod,namespace) label_replace(container_memory_working_set_bytes{id!~".*burstable.*|.*besteffort.*"} ,"pod","$1","pod_name","(.*)")

Is there any other way to obtain this information?

Thanks in advance.

-- arturoxv
grafana
kubernetes
metrics
prometheus
promql

0 Answers