kubernetes / kube-state-metrics

Add-on agent to generate and expose cluster-level metrics.
https://kubernetes.io/docs/concepts/cluster-administration/kube-state-metrics/
Apache License 2.0
5.41k stars 2.02k forks source link

Metric "kube_node_role" missing (AKS) #2474

Open R-Studio opened 2 months ago

R-Studio commented 2 months ago

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

R-Studio commented 2 months ago

Workaround / Solution

It looks like, it is not allowed to set node-role.kubernetes.io/agent* but you can set any other role if you want.
For example we set the following labels on the two node pools:

R-Studio commented 1 month ago

Workaround not working!

Unfortunately our workaround is not really working, because we cannot set the labels on the AKS node pools. Here the answer of Microsoft support: The error message you're seeing indicates that you're trying to set a label on a Kubernetes node pool using a key that has a prefix reserved for Kubernetes' internal use. Labels with prefixes like kubernetes.io/ are reserved for use by Kubernetes itself and should not be used for custom labels.

dgrisonnet commented 1 month ago

/triage accepted /assign