kubernetesprometheuskube-state-metrics

Can't find replicaset kube state metrics in Prometheus


I'm trying to set some alarms based on replica set metrics but Prometheus cannot find replicaset kube state metrics while browsing expressions. What would be the problem with that? On Prometheus dashboard, I can see lots of metrics, which is in kube state metrics repo, but replica sets. Any ideas?

Kube state metrics version: v1.9.7

Update:

For example, I can see most of deployment metrics on the dashboard, but no metrics for replica sets.

enter image description here


Solution

  • In my case, replicasets in the ClusterRole was missing. After adding this line, the problem resolved. Thanks @Andrew Skorkin to remind me of checking logs.