I have deployed Prometheus using the community helm chart and would like to scrape the metrics from a specific namespace and drop the metrics from all the other namespaces. I have used the below scrape config, but it doesn't seem to work. Also tried using Drop action.
- job_name: 'kubernetes-pods'
kubernetes_sd_configs:
- role: node
relabel_configs:
- action: keep
source_labels: [__meta_kubernetes_namespace]
target_label: accounts