Answers: <p>Please elaborate on how you deploy Prometheus to the cluster
  Kube-prometheus-stack ?
  default chart ?</p>
  <p>with kube-prometheus-stack it is very easy to deploy external configuration.</p>
  <p>also using prometheus operator you can use podMonitor/serviceMonitor.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-03-28T09:15:28.377Z
Answers: This does not provide an answer to the question. Once you have sufficient [reputation](https://devops.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://devops.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/14540)
Answers: storm
Answers: CC BY-SA 4.0
Answers: 2024-03-28T07:36:45.843Z
Answers: 2024-03-28T07:36:45.843Z
Answers: Eladik
Body: <p>Why are there no targets at my Prometheus? I did everything like in the Prometheus documentation. Also, I have pods with the label: &quot;name=cadvisor&quot;.</p>
  <p>I have the following configuration file:</p>
  <pre><code># prometheus-config.yml
  
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: prometheus
  data:
    prometheus.yml: |
      global:
        scrape_interval: 5s
      scrape_configs:
        - job_name: &quot;kubernetes-pods&quot;
          kubernetes_sd_configs:
            - role: &quot;pod&quot;
              selectors:
                - role: &quot;pod&quot;
                  label: &quot;name=cadvisor&quot;
  </code></pre>
  <p><img src="https://i.sstatic.net/QwBAn.png" alt="Prometheus screenshot" /></p>
  
Tags: <kubernetes><prometheus><grafana>
Title: No targets in Prometheus at Kubernetes
UserDisplayName: Denis Bibishkin
ThreadText: # No targets in Prometheus at Kubernetes
  
  (Asked by: username_0 on 2024-01-01)
  
  Why are there no targets at my Prometheus? I did everything like in the Prometheus documentation. Also, I have pods with the label: "name=cadvisor".
  
  I have the following configuration file:
  
  ```
  # prometheus-config.yml
  
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: prometheus
  data:
    prometheus.yml: |
      global:
        scrape_interval: 5s
      scrape_configs:
        - job_name: "kubernetes-pods"
          kubernetes_sd_configs:
            - role: "pod"
              selectors:
                - role: "pod"
                  label: "name=cadvisor"
  
  ```
  
  ![Prometheus screenshot](https://i.sstatic.net/QwBAn.png)
  
  **Tags:** kubernetes, prometheus, grafana
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-03-28. Score: 0
  
  Please elaborate on how you deploy Prometheus to the cluster
  Kube-prometheus-stack ?
  default chart ?
  
  with kube-prometheus-stack it is very easy to deploy external configuration.
  
  also using prometheus operator you can use podMonitor/serviceMonitor.
  
  > **Comments:**
  > **username_2**: This does not provide an answer to the question. Once you have sufficient [reputation](https://devops.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://devops.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/14540)  
  
  ---
  
  