<p>I am trying to run Prometheus to ONLY monitor pods in specific namespaces (in openshift cluster).</p>
<p>I am getting &quot;cannot list pods at the cluster scope&quot; - But I have tried to set it to not use ClusterScope (only look in specific namespaces instead)..</p>
<p>I've set:</p>
<pre><code>      prometheus.yml: |
        scrape_configs:
        - job_name: prometheus
          static_configs:
          - targets:
            - localhost:9090
        - job_name: kubernetes-pods
          kubernetes_sd_configs:
          - namespaces:
              names:
              - api-mytestns1
              - api-mytestns2
            role: pod
          relabel_configs:
[cut]
</code></pre>
<p>I get this error - even if I remove the -job_name: kubernetes-pods entirely.. so maybe its something else in prometheus, that needs disabling?</p>

Klavs Klavsen
<p>I found that one had to overwrite server.alertmanagers with a complete copy of the settings in charts/prometheus/templates/server-configmap.yaml - to override the hardcoded default in those, to try and scrape cluster-wide.</p>
