-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kube state metrics only shows metrics related to the namespace where it is running #2211
Comments
/assign @CatherineF-dev |
Hi, could you try KSM v2.7 and see whether it still has this issue? I have a cluster running with v2.7 and doesn't have this issue. |
Hi @CatherineF-dev just tried v2.7.0 and got the same issue, only "monitoring namespace" related metrics: |
@CatherineF-dev kube-state-metrics pod logs:
|
Could you curl KSM endpoint directly to list all metrics? |
@CatherineF-dev yes, I can curl KSM and visualize all metrics. I'm using this Grafana dashboard: https://grafana.com/grafana/dashboards/13332-kube-state-metrics-v2/ |
Could you paste one KSM metric around pods? |
@CatherineF-dev here are some metrics for a non "monitoring" namespaced:
|
It does show metrics in other namespaces. I feel it's an issue around grafana dashboard. Maybe you can contact the team who provides this dashboard. Do you have other questions? If not, we will close this issue. |
/remove kind/bug |
@CatherineF-dev i'll get in contact with them. Do you have any other recommended grafana dashboard? |
Searched inside this repo and didn't find grafana dashboard to monitor cluster. /close |
@CatherineF-dev: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened:
Kube state metrics only shows metrics related to the namespace where it is running.
What you expected to happen:
Kube state metrics shows metrics related all Kubernetes cluster namespaces.
How to reproduce it (as minimally and precisely as possible):
I have AWS EKS cluster with kube-state-metrics installed in a namespace called "monitoring". This installation is using service monitor and other components (see yaml files below).
In this cluster, there is also a prometheus agent running and selecting the kube-state-metrics service monitor.
kube-state-metrics is listed on Prometheus targets property but when I add a dashboard on Grafana to visualize these metrics, I can only see kube-state-metrics related to the "monitoring" namespace. EKS cluster has other namespaces and kube-state-metrics should display metrics for all of them.
I have a similar setup for Cadvisor and it works fine by showing metrics related to all namespaces.
Any idea why kube-state-metrics is showing only data related to the namespace it is running?
prometheus.yaml
kube-state-metrics:
service-monitor.yaml
service.yaml
deployment.yaml
cluster-role-binding.yaml
cluster-role.yaml
service-account.yaml
kubectl version
): v1.27.5-eks-43840fbThe text was updated successfully, but these errors were encountered: