Exclude targets via kubernetes_sd_configs in prometheus

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

This can be done with relabel_configs.

1 Like