Skip to content

Need pod labels in kube-state-metrics  #887

@kmurthyms

Description

@kmurthyms

What did you do?

I have a similar issue as mentioned in kubernetes/kube-state-metrics#536 and
prometheus-operator/prometheus-operator#3460
I need all the pod labels to be present in the metrics , so that based on the label i could have the alert routing configured

We have the standrad set of kubenertes-state-metrics rules deployed and i don't want to modify them to add join mertrics . since this is a standard set of rules that we pull from community(https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) and modifying this would add maintenance overhead every time we update.

so is there a way to get all the pod labels without modifying the rules ?

  • Prometheus Operator version:
prometheus-operator:
    Image:      quay.io/coreos/prometheus-operator:v0.38.1
`Insert image tag or Git SHA here`
<!-- Try: kubectl -n monitoring describe deployment prometheus-operator -->
  • Kubernetes version information:

    kubectl version

Client Version: v1.19.3
Server Version: v1.15.12-eks-31566f

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions