Scraping Kubernetes metrics from standalone Prometheus Instance

29 views
Skip to first unread message

Sakthi Raam

unread,
Dec 18, 2020, 1:03:29 AM12/18/20
to promethe...@googlegroups.com
Hi All,

We have restrictions to deploy Prometheus inside Kubernetes environment due to shared infrastructure but we still need to scrape all the node/services/endpoints/pod level metrics using service discovery approach. When I checked almost all the posts in internet are referring to Prometheus inside the cluster or deployed as Prometheus operator.

If you have any reference links, examples or approach to achieve the above mentioned use case please do share it.

Thank You
Regards
Sakthi


--

Best regards

R.K.Sakthi Raam

*: rksakt...@gmail.com

': +65-9185-0354

Linkedin


Stuart Clark

unread,
Dec 18, 2020, 3:20:06 AM12/18/20
to Sakthi Raam, promethe...@googlegroups.com
On 18/12/2020 06:03, Sakthi Raam wrote:
> Hi All,
>
> We have restrictions to deploy Prometheus inside Kubernetes
> environment due to shared infrastructure but we still need to scrape
> all the node/services/endpoints/pod level metrics using service
> discovery approach. When I checked almost all the posts in internet
> are referring to Prometheus inside the cluster or deployed as
> Prometheus operator.
>
> If you have any reference links, examples or approach to achieve the
> above mentioned use case please do share it.
>
Are you meaning that you want to host Prometheus outside of the cluster,
but monitor resources within it?

If so, that's perfectly possible. You will need to set the api_server
value in the Kubernetes SD as well as providing the correct
authentication details (and arrange for those on the cluster side)

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config

Sakthi Raam

unread,
Dec 18, 2020, 5:53:08 AM12/18/20
to Stuart Clark, promethe...@googlegroups.com
Thanks Stuart, Will check it out and get back to you

Regards
Sakthi
Reply all
Reply to author
Forward
0 new messages