kube-state-metrics
kube-state-metrics copied to clipboard
Missing node_labels for custom labels and aws labels
k8s version: 1.24.9 and 1.23.12 kube-state-metrics: 2.7.0 and 2.6.0
When running these versions I do not see all of my node labels pulled out in the kube state metrics.
kubectl get node {node} -o yaml
I see all of the expected node lables like:
kubernetes.io/arch=amd64
topology.kubernetes.io/regoin=
developer=thisuser
When I curl the kube-state-metrics pod running in this cluster metrics endpoint all I see for kube_node_labels is just node nothing else.
kube_node_labels{node="myNodeName1"} 1
kube_node_labels{node="myNodeName2"} 1
I use these labels to generate Grafana dashboards to monitor that our clusters are spread across zones correctly. I have upped the logging out put to the different levels, and there isnt any errors that stand out that I would consider helpful to this issue.
Hi @burkempers
try to add to kube-state-metrics command line following (in chart values):
metricLabelsAllowlist:
- nodes=[*]
or to CLI:
--metric-labels-allowlist=nodes=[*]
as described here https://github.com/kubernetes/kube-state-metrics/blob/main/docs/cli-arguments.md
Hope it helps.
Hi @poligraph ,
Yes adding that cli option as a arg value override to the helm chart I am using worked. I must have missed a release note where it said that that was going to be defaulted to not have all labels.
Thank you
/triage accepted
Looks like this issue could be closed.
Yeah, I think so