<p>I saw there is no <code>sink configuration</code> for Prometheus in this <a href="https://github.com/kubernetes/heapster/blob/master/docs/sink-configuration.md" rel="nofollow noreferrer">heapster document</a>. Is there any simple way to combine these two and monitor.</p>

<p>Prometheus uses a <a href="https://prometheus.io/docs/introduction/faq/#why-do-you-pull-rather-than-push?" rel="nofollow noreferrer">pull model</a> to retrieve the data, while Heapster is tool, which pushes their metrics to a certain endpoint (pull model).</p>

<p>I assume you want to get Kubernetes metrics into Prometheus. You don't need heapster for that, since the cadvicor has an Prometheus endpoint which can be scraped directly. Also the kubelet itself provides some metrics.</p>

<p>The Prometheus config would look like this:</p>

<pre><code>- job_name: 'kubernetes-nodes'
  kubernetes_sd_configs:
  - role: node
  relabel_configs:
  - action: labelmap
    regex: __meta_kubernetes_node_label_(.+)

- job_name: 'kubernetes-cadvisor'
  kubernetes_sd_configs:
  - role: node
  relabel_configs:
  - source_labels: [__meta_kubernetes_node_address_InternalIP]
    target_label: __address__
    regex: (.*)
    replacement: $1:4194
</code></pre>

<p>Assuming you are using the default cadvisort port <a href="https://kubernetes.io/docs/reference/generated/kubelet/" rel="nofollow noreferrer">4194</a>. Also Prometheus should be able to detect the correct kubelet port.</p>

<p>Additional Note: The job for scraping cAdvisor is only required when using a Kubernetes version <code>&gt;= 1.7</code>. Before that the cAdvisor metrics <a href="https://github.com/kubernetes/kubernetes/issues/48483" rel="nofollow noreferrer">accidentally got exposed via the Kubelet</a>.</p>
