- Documentation
Volcengine Kubernetes Engine
Volcengine Kubernetes Engine
FAQs
Observability FAQs
Why am I unable to query the kube_namespace_label metric?
Observability FAQs
Why am I unable to query the kube_namespace_label metric?
Why am I unable to query the kube_namespace_label metric?
Issue description
After you upgrade the prometheus-agent add-on in a cluster to v2.5.0-vke.1.24 or later, the kube_namespace_label metric of kube-state-metrics cannot be queried.
Cause analysis
When the prometheus-agent add-on is upgraded to v2.5.0-vke.1.24 or later, the kube-state-metrics add-on is also upgraded to a later version. The changes to the later versions of the kube-state-metrics add-on are as follows:
- Metrics related to kube_*_annotations and kube_*_labels, which were exposed by default in the earlier versions, are no longer exposed by default in the later versions. Therefore, the corresponding metrics cannot be queried after the upgrade. However, the kube_pod_labels metric can still be queried.
- Metrics related to kube_verticalpodautoscaler_.* have been deprecated.
tip
- * in the preceding metrics indicates a wildcard. For example, kube_*_annotations refers to metrics such as kube_namespace_annotations and kube_pod_annotations.
- This issue only affects v2.5.0-vke.1.24 and later of the prometheus-agent add-on. v2.5.0-vke.1.20 and later are not affected. For details, see Add-on release records.
Solution
If you are using metrics related to kube_*_annotations and kube_*_labels to create a dashboard, you can use the following solutions:
- Replace kube_*_annotations or kube_*_labels metrics with the corresponding kube_*_created or kube_*_info metrics. For example, change the kube_namespace_label metric to the kube_namespace_created metric.
Last updated: 2026.07.23 14:31:46