Exclude targets via kubernetes_sd_configs in prometheus

prometheus

#1

Hi Guys,

We have a couple of workloads that we don’t want to be picked up by the “kubernetes-pods” job. Is there a way to exclude certain targets?

    - job_name: 'kubernetes-pods'

    # nginx-ingress caused a cardinality explosion. A single pod returned 95k time series.
    # We have currently 25 pods which resulted in >2million time series being generated.
    sample_limit: 1000

    kubernetes_sd_configs:
      - role: pod

    relabel_configs:

Enrico


#2

This can be done with relabel_configs.