Skip to content

Pull pod/container labels from Prometheus #1

@laurivosandi

Description

@laurivosandi

If Prometheus is configured to work in conjunciton with kube-state-metrics there is kube_pod_labels info metric present which has all the Kubernetes pod labels attached and has historic data about it.

Sample:

kube_pod_labels{
container="kube-state-metrics
endpoint="http-metrics",
instance="10.244.157.32:8080",
job="kube-state-metrics",
label_app="mongodb-svc",
label_controller_revision_hash="mongodb-587956fc",
label_statefulset_kubernetes_io_pod_name="mongodb-0",
namespace="camtiler",
pod="mongodb-0",
service="kube-state-metrics",
uid="25a95958-7c7e-44ab-bab6-3a1723d7c51b"}

There is no need to record any of these labels in Logmower datastore and I believe we basically only need database index for pod UID

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions