如何使用默认的istio beta功能在GKE中安装Prometheus的Kiali Dashboard?

问题描述

我一直在尝试在具有 Istio(测试版)功能的GKE集群上安装Kiali ,我正在遵循使用this link来安装Kiali的官方文档,但是由于GCP已将Prometheus损坏了将Prometheus的名称“ Prometheus”更改为“ promsd” ,而Kiali仪表板始终指向http://prometheus.istio-system.com:9090而不是http://promsd.istio-system.com:9090。我应该如何在 ISTIO ENABLED GKE群集解决此问题?

解决方法

您可以在名称空间istio-system中检查kiali configmap(假设您使用默认名称空间进行istio安装)。 外部服务下方应有一个prometheus标签。对其进行更改,然后重新启动kiali pod。

更新20200821 :我们的配置映射(通过istioctl安装的Istio(v1.5.6))

kind: ConfigMap
apiVersion: v1
metadata:
  name: kiali
  namespace: istio-system
  selfLink: /api/v1/namespaces/istio-system/configmaps/kiali
  uid: 660a2bfe-c71b-45ab-a438-ed61532dd8e3
  resourceVersion: '31024421'
  creationTimestamp: '2020-07-24T10:18:24Z'
  labels:
    app: kiali
    operator.istio.io/component: AddonComponents
    operator.istio.io/managed: Reconcile
    operator.istio.io/version: 1.5.6
    release: istio
  annotations:

data:
  config.yaml: |
    istio_component_namespaces:
      grafana: istio-system
      tracing: istio-system
      pilot: istio-system
      prometheus: istio-system
    istio_namespace: istio-system
    auth:
      strategy: login
    deployment:
      accessible_namespaces: ['**']
    login_token:
      signing_key: "xxxxxxxxxxxxxxxxxx"
    server:
      port: 20001
      web_root: /kiali
    external_services:
      istio:
        url_service_version: http://istio-pilot.istio-system:8080/version
      tracing:
        url: 
        in_cluster_url: http://tracing/jaeger
      grafana:
        url: 
        in_cluster_url: http://grafana:3000
      prometheus:
        url: http://prometheus.istio-system:9090
,

为了使它工作,我必须在 ConfigMap 命名空间内编辑名为 kialiistio-system。我在 external_services 部分下添加了以下几行:

prometheus:
  url: http://my-prometheus-kube-prometh-prometheus.default.svc.cluster.local:9090/

enter image description here