# Build a Dashboard Displaying Workloads per Node in Kubernetes

**URL:** <https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440>\
**Category:** Dashboarding\
**Tags:** dashboards, kubernetes\
**Created:** [December 19, 2024, 2:20pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440 "2024-12-19T14:20:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gyanendra](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@Gyanendra](https://community.dynatrace.com/u/Gyanendra)\
**Post date:** [December 19, 2024, 2:20pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/1 "2024-12-19T14:20:56Z")

</div>

I want to create a dashboard that lists all the workloads running on a specific node. For example, if Node A has 5 pods running on it, the metric should display this information. Could someone please suggest if this is achievable?

I tried, but when I select the node metric, it doesn’t have dimensions for workload names or pod names. Similarly, when I select the pod (workload) metric, it doesn’t have dimensions for the node. As a result, I’m unable to achieve the desired outcome.

---

<div class="post-metadata">

**Author:** ![Theodore\_x86](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/theodore_x86/32/17620_2.png) [@Theodore\_x86](https://community.dynatrace.com/u/Theodore_x86)\
**Post date:** [December 19, 2024, 3:49pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/2 "2024-12-19T15:49:25Z")

</div>

Hello.

Cannot think of a way to do this in a dashboard. You can only add the link to the Kubernetes node page in your dashboards.

A nice new idea would be to add the “Pin to dashboard” button for the pod list page. If it was present you could filter with Node and then pin the list to dashboard.

BR

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 19, 2024, 6:55pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/3 "2024-12-19T18:55:00Z")

</div>

Hi&nbsp;[@Gyanendra](https://community.dynatrace.com/user/82918)

You can refer to a similar case as attached below:

- [https://community.dynatrace.com/t5/Alerting/Show-Container-name-on-Kubernetes-container-restart-alerts/m-p/265760#M5288](https://community.dynatrace.com/post/265760#M5288)
- Also you can refer to the topology model through the monitored environment for further correlation.

 ![Peter_Youssef_0-1734634440152.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/b/6b202f37f84505428368be10b2d0cb582496f84f.png)

Hoping it adds value,

BR,

Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 19, 2024, 7:00pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/4 "2024-12-19T19:00:56Z")

</div>

Hi&nbsp;[@Gyanendra](https://community.dynatrace.com/user/82918)

PFA alternative solution :

- Ensure the K8s technology is supported.
- The MZ configurations are accurate.
- No issues with monitoring signal flow into Dynatrace.

**Ref:**

- [Monitor Prometheus metrics — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/container-platform-monitoring/kubernetes-monitoring/monitor-prometheus-metrics)
- [https://www.youtube.com/watch?v=Qxt3XAMJNhA](https://www.youtube.com/watch?v=Qxt3XAMJNhA)
- Ensure the metrics are fed with the monitoring data as expected through Metrics or data explorer.

**Support** :

- [Dynatrace Operator support and known issues — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/technology-support/support-model-for-kubernetes)
- [Supported distributions — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/deployment/supported-technologies)

Hoping it helps.

BR,

Peter

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [December 20, 2024, 1:13pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/5 "2024-12-20T13:13:54Z")

</div>

try with

```php
fetch dt.entity.kubernetes_node, from: -30m
| fields id, node.id = id, node.name = entity.name,cluster.id = clustered_by[dt.entity.kubernetes_cluster]
| filter in(id, classicEntitySelector("type(KUBERNETES_NODE),toRelationship.isClusterOfNode(type(KUBERNETES_CLUSTER),appEnabled(true))"))
| lookup [
  fetch dt.entity.kubernetes_cluster, from: -30m | fields id, cluster.name = entity.name, cluster.cluster_id = kubernetesClusterId
], sourceField:cluster.id, lookupField:id, fields:{cluster.name,cluster.cluster_id}, executionOrder:leftFirst
| lookup [
  timeseries values = sum(dt.kubernetes.pods), by:{dt.entity.kubernetes_node}, from: -2m
  | fields pod.count = toLong(arrayFirst(values)), matchedId = dt.entity.kubernetes_node
], sourceField:id, lookupField:matchedId, fields:{pod.count}, executionOrder:leftFirst

```

---

<div class="post-metadata">

**Author:** ![Gyanendra](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@Gyanendra](https://community.dynatrace.com/u/Gyanendra)\
**Post date:** [December 20, 2024, 1:37pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/6 "2024-12-20T13:37:44Z")

</div>

can we run this query in old DT (classic)? If yes, then where? I guess in Data explorer we can’t run this command.

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 20, 2024, 3:01pm UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/7 "2024-12-20T15:01:48Z")

</div>

Hi&nbsp;[@Gyanendra](https://community.dynatrace.com/user/82918)

You can run the provided inputs in the latest Dynatrace.

BR,

---

<div class="post-metadata">

**Author:** ![Gyanendra](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@Gyanendra](https://community.dynatrace.com/u/Gyanendra)\
**Post date:** [December 26, 2024, 8:37am UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/8 "2024-12-26T08:37:04Z")

</div>

Got it, thanks

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 26, 2024, 9:14am UTC](https://community.dynatrace.com/t/build-a-dashboard-displaying-workloads-per-node-in-kubernetes/49440/9 "2024-12-26T09:14:16Z")

</div>

Hi&nbsp;[@Gyanendra](https://community.dynatrace.com/user/82918)

As of now you have all possible alternatives either DQL 😀"code level" 😉 or UI 😊.

Keep up the good work.
