kube-state-metrics icon indicating copy to clipboard operation
kube-state-metrics copied to clipboard

Missing node_labels for custom labels and aws labels

Open burkempers opened this issue 2 years ago • 5 comments

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.

burkempers avatar Jan 30 '23 15:01 burkempers

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.

poligraph avatar Feb 08 '23 13:02 poligraph

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

burkempers avatar Feb 08 '23 13:02 burkempers

/triage accepted

logicalhan avatar Feb 09 '23 17:02 logicalhan

Looks like this issue could be closed.

nantiferov avatar Oct 27 '23 14:10 nantiferov

Yeah, I think so

poligraph avatar Oct 28 '23 18:10 poligraph