PromQL to find pods running on nodes based on architecture/instance type

1,519 views
Skip to first unread message

RonB

unread,
Jul 8, 2022, 3:30:59 PM7/8/22
to Prometheus Users
Hello,
In the process of migrating services from amd64 to arm64 instances and was looking for help/guidance on a query to create a grafana dashboard.  What I'm trying to accomplish is displaying the number of pods running on a node by particular instance type/architecture.  The Karpenter "Pod Distribution by Instance Type" dashboard is what I'm trying to eumulate.  Not using Karpenter, so can't use the promql expression they are using.

I did find this issue where someone joined kube_pod_labels with kube_node_labels.  I modified kube_state_metrics --metric-labels-allowlist to add the node.kubernetes.io/instance-type and tried the following promql, but received a many-to-many matching not allowed error:

kube_pod_info * on(pod,namespace) group_right(node) kube_pod_labels * on(node) group_left(label_kubernetes_io_instance_type) kube_node_labels

Any help or guidance with this would be greatly appreciated.

Thanks,
Ron
Reply all
Reply to author
Forward
0 new messages