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