<p>I have deployed the istio service mesh on the GKE cluster using <strong>base</strong> &amp; <strong>istiod</strong> helm charts using this <a href="https://istio.io/latest/docs/setup/install/helm/" rel="nofollow noreferrer">documents</a> in the <strong>istio-system</strong> namespace.</p>
<p>I have deployed Prometheus, grafana &amp; alert-manager using <a href="https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack" rel="nofollow noreferrer">kube-prometheus-stack</a> helm chart.</p>
<p>Every pod of this workload is working fine; I didn't see any error. Somehow I didn't get any metrics in Prometheus UI related to istio workload. Because of that, I didn't see any network graph in kiali dashboard.</p>
<p>Can anyone help me resolve this issue?</p>

Chirag Patel
<p>With prometheus deployed via kube-prometheus-stack helm charts, you will need to add servicemonitor for istio metrics since k8s annotations (<code>prometheus.io/scrape</code>)  doesn't work. Create these servicemonitor to enable scraping istio metrics:</p>
<pre><code>apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: prometheus-oper-istio-controlplane
  labels:
    release: prometheus
spec:
  jobLabel: istio
  selector:
    matchExpressions:
      - {key: istio, operator: In, values: [mixer,pilot,galley,citadel,sidecar-injector]}
  namespaceSelector:
    any: true
  endpoints:
  - port: http-monitoring
    interval: 15s
  - port: http-policy-monitoring
    interval: 15s
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: prometheus-oper-istio-dataplane
  labels:
    monitoring: istio-dataplane
    release: prometheus
spec:
  selector:
    matchExpressions:
      - {key: istio-prometheus-ignore, operator: DoesNotExist}
  namespaceSelector:
    any: true
  jobLabel: envoy-stats
  endpoints:
  - path: /stats/prometheus
    targetPort: http-envoy-prom
    interval: 15s
    relabelings:
    - sourceLabels: [__meta_kubernetes_pod_container_port_name]
      action: keep
      regex: '.*-envoy-prom'
    - action: labelmap
      regex: &quot;__meta_kubernetes_pod_label_(.+)&quot;
    - sourceLabels: [__meta_kubernetes_namespace]
      action: replace
      targetLabel: namespace
    - sourceLabels: [__meta_kubernetes_pod_name]
      action: replace
      targetLabel: pod_name
</code></pre>
<p>Once these servicemonitors are created, metrics would start appearing in a few minutes. You can check the status under your <code>Prometheus -&gt; Status - Targets</code>   There will be entry something like this:<br />
<code>serviceMonitor/yournamespace/prometheus-oper-istio-controlplane/0 (1/1 up)</code> and
<code>serviceMonitor/yournamespace/prometheus-oper-istio-dataplane/0 (1/1 up)</code></p>
