Given a kubernetes cluster with: 1. prometheus 2. node-exporter 3. kube-state-metrics
I like to get some metrics for example container_memory_usage_bytes
but aggregate by all deployments
instead of namespace
.
for example:
I have the following query
sum by (namespace) (irate(container_cpu_usage_seconds_total[2m]))
how can I get that fordeployments
and notnamespace
?
The same I'd like to achieve instead of deployments
with aggregation by statefuleset
.
found this question but its for a specific deployment I need to get that for all deployments, Is there a way to achieve this?