<p>I am trying to setup Prometheus for my Kubernetes cluster. I am using <a href="https://github.com/coreos/kube-prometheus" rel="nofollow noreferrer">https://github.com/coreos/kube-prometheus</a> . I am using <code>default</code> namespace only. When I apply resources from <code>manifests</code> (<a href="https://github.com/coreos/kube-prometheus/tree/master/manifests" rel="nofollow noreferrer">https://github.com/coreos/kube-prometheus/tree/master/manifests</a>) folder, It creates resources but in targets, it doesn't show my pod service.</p>

<p>I am new to Kubernetes so I need help with this. How do I configure my pod to show up in Prometheus targets? 
I tried <a href="https://github.com/coreos/kube-prometheus#quickstart" rel="nofollow noreferrer">https://github.com/coreos/kube-prometheus#quickstart</a></p>

<p>For better manageability use <a href="https://github.com/coreos/prometheus-operator" rel="noreferrer">Prometheus Operator</a>.</p>

<p>You need to define <code>ServiceMonitor</code> or <code>PodMonitor</code></p>

<p><code>ServiceMonitor</code> which declaratively specifies how groups of services should be monitored. The Operator automatically generates Prometheus scrape configuration based on the definition and the targets will have the  IPs of all the pods behind the service.</p>

<p><code>PodMonitor</code>, which declaratively specifies how groups of pods should be monitored. The Operator automatically generates Prometheus scrape configuration based on the definition and targets will have the Pod IP</p>

<p>Refer to the examples <a href="https://github.com/coreos/prometheus-operator/tree/master/example/user-guides/getting-started" rel="noreferrer">here</a></p>
