How to integrate Istio with Prometheus

Viewed 1408

I need to do a POC on collecting k8s application metrics using Istio + Prometheus. My prometheus is running on a VM. I do not want to run Prometheus as a container in kubernetes.
Can anyone help me getting the right documentation for this? Or suggest how can I do this without running prometheus as a pod in k8s?

2 Answers

You can update the config-map in helm and istio adapter will take care for other stuff.

you can find more details at this github issue


Take a look at this example.

You can bring your own Prometheus to Istio, with three quick steps.

  • First, update your Prometheus configuration. Prometheus relies on a scrape config model, where targets represent /metrics endpoints, ingested by the Prometheus server.
  • Second, update your Prometheus deployment to mount Istio's certificates into Prometheus. This allows Prometheus to scrape Istio workloads when mutual TLS is enabled. To do this, mount in the istio.default secret into your Prometheus deployment YAML
  • Lastly, update Istio's configuration to use a custom Prometheus address.

If you:

you can use \samples\addons\extras\prometheus-operator.yaml from istio distribution to connect exiting Prometheus installation with Istio.

kubectl apply -n istio-system -f prometheus-operator.yaml

and check https://prometheus.example.com/service-discovery for

podMonitor/istio-system/envoy-stats-monitor/0 (8 / 115 active targets)
serviceMonitor/istio-system/istio-component-monitor/0 (1 / 98 active targets)
Related