How can I make Prometheus not try to use ClusterScope detection and only
discover in specific namespaces?
I am running this config:
```
global:
evaluation_interval: 1m
scrape_interval: 1m
scrape_timeout: 10s
rule_files:
- /etc/config/recording_rules.yml
- /etc/config/alerting_rules.yml
scrape_configs:
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- job_name: kubernetes-pods
kubernetes_sd_configs:
- role: pod
namespaces:
names:
- api-testns1
- api-testns2
relabel_configs:
- action: keep
```
But Prometheus is still trying to discover pods using ClusterScope, as I'm
getting this error in prometheus server pod:
Failed to list *v1.Pod: pods is forbidden: User
\"system:serviceaccount:api-testmon:prom-server-api-testmon\" cannot list
pods at the cluster scope: no RBAC policy matched
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/719f11a5-7a27-4e58-9df7-76f0c37d8a91o%40googlegroups.com.