<p>When we use Kubernetes for production and we have a scaled application with many pods and publish as a service, every single metrics fetching request of Prometheus is routed to a pod with a random of selection.
In this situation, results are not true for monitoring. </p>

<p>In a moment we need all pods metrics (for example 10 pod) and it's not possible by calling a Kubernetes Service endpoint! 
Is there any solution for this problem?</p>

sadeghhp
<p>You can configure your <code>kubernetes_sd_configs</code> so it scrapes the pods individually and not just the service.
To do that, set the <code>role</code> to <code>pod</code>, like this:</p>

<pre><code>- job_name: 'kubernetes-pods'
  kubernetes_sd_configs:
  - role: pod
</code></pre>

<p><a href="https://stuff.21zoo.com/posts/prometheus-kubernetes-configure-scrape-pods/" rel="nofollow noreferrer">See this blog post</a> for a full config example.</p>
