On 11/02/2021 17:28, David Frank wrote:
Hey community, I am currently running Prometheus inside a K8s cluster in our production. However, we have frequent updates to K8s version and this keeps restarting our pods, causing outage for couple of hours (WAL loading).

Is it possible to run Prometheus on a VM instance outside the K8s cluster but have service discovery to scrape the metrics from the pods running inside K8s cluster?
I have had no success so far to get this to work.

Yes. As per the Kubernetes SD documentation at https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config you can set the api_server parameter to point to the cluster's API server (which would need to be accessible from your Prometheus VM). You would also need to set the correct authentication parameters (basic auth or bearer token). You'd be responsible for setting those up within the cluster and updating Prometheus if the token changes. You might also need to set tls_config section depending on what CA you are using (to supply the CA certificate file).

--
Stuart Clark

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4eff4f77-3b62-6a7b-434b-1133504c032a%40Jahingo.com.

Reply via email to