cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Display Kubernetes version in a dashboard

alexandrumarin
Newcomer

We would like to build a dashboard that supports the Infra team, where we show the Kubernetes version for each cluster so that it's easier for them to manage their rollout, check if there are issues with a new deployment and so on...

Unfortunately until now we did not manage to see a Kubernetes metric or how to display this in a dashboard tile

We are using Dynatrace SaaS 1.278.65.20231023-153505

6 REPLIES 6

radek_jasinski
DynaMight Guru
DynaMight Guru

Hi @alexandrumarin 

I do not know of any way to pin the Kubernetes version on the dashboard. The version can be found in properties of each cluster under the Kubernetes tab:

Zrzut ekranu 2023-11-1 o 13.55.05.png

Generally, dashboards are based on metrics and their dimensions, and it is not possible to extract the properties and add them to the dashboard.

Here are all the metrics for Kubernetes that are available in DT (for classic and Grail-based dashboards):

https://docs.dynatrace.com/docs/platform-modules/infrastructure-monitoring/container-platform-monito...

You can try using Metric Ingest to upload the version number from Kubernetes and save it as a metric in DT (this requires some programming work, though). However, it will be easiest to teach the team how to check it in DT.

Radek

Have a nice day!

Thank you for the fast response Radek, but the team handles more than 200 clusters and thus manually checking each one is not going to make their life easier

Thanks,
Alex

Do you have any example or lead on the Metric Ingest solution as, in the end might be an option the team might explore?

Thanks,

Alex

andre_vdveen
DynaMight Champion
DynaMight Champion

Hi @alexandrumarin, it is not a perfect auto-tag rule, but this is the only way I could figure out how to do it at the moment. The downside: you'd have to set up multiple tag rules to cover all the k8s cluster versions and you'd have to maintain them, but at least you'll have a tag that can be used for filtering.

Perhaps someone out there has a better, cleaner way of handling this, or hopefully the optional tag value and/or k8s version would be options in tag rules in the near future.

andre_vdveen_1-1698849332641.png

The tag can then be used with the K8s Node Count metric; deselect the Kubernetes: Node count column to only display the cluster name.

andre_vdveen_1-1698851068648.png

The result on a dashboard:

andre_vdveen_0-1698850919112.png

 

I agree that it can be approached this way, but as you point out it requires work to maintain the configuration. For large environments this can be a problem.

Have a nice day!

Maybe not the answer you are currently looking for if you need to buildup this using the dashboard classic.
But it seems that this is doable with the new dashboard section where you can utilize grail to query the information out.

https://docs.dynatrace.com/docs/observe-and-explore/dashboards-new/get-started/dashboards-use

The query itself could be something like this and by quick test up it's doing the trick you are looking for. 

fetch dt.entity.kubernetes_cluster
| fieldsAdd entity.name, kubernetesVersion
| fields kubernetesVersion, entity.name
| sort kubernetesVersion

Featured Posts