• 外部prometheus 监控istio


    概念:

      prometheus 安装 其他namespace 下。 istio-system空间下 不启动istio。

      访问kiali 时候 graph 会显示未连接到prometheus 。这是由于 istio-system下没有prometheus 

      prometheus 在monitor-sa 命名空间下。

    如何让kiali调用prometheus

    一、安装prometheus  的时候指定node节点安装

      template:
        metadata:
          labels:
            app: prometheus
            component: server
          annotations:
            prometheus.io/scrape: 'false'
        spec:
          nodeName: k8s-node1
          serviceAccountName: monitor
          containers:
          - name: prometheus
            image: prom/prometheus:v2.2.1
            imagePullPolicy: IfNotPresent

    二、设置prometheus 为nodeport模式

    apiVersion: v1
    kind: Service
    metadata:
      name: prometheus
      namespace: monitor-sa
      labels:
        app: prometheus
    spec:
      type: NodePort
      ports:
        - port: 9090
          targetPort: 9090
          nodePort: 30090
          protocol: TCP
      selector:
        app: prometheus
        component: server

    查看prometheus 启动情况

    三、创建 Endpoints  Service

    apiVersion: v1
    kind: Endpoints
    metadata:
      name: prometheus
      namespace: istio-system
    subsets:
      - addresses:
        - ip: 192.168.124.62
        ports:
          - port: 30090
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: prometheus
      namespace: istio-system
    spec:
      ports:
        - port: 9090
          protocol: TCP

    这个启动空间一定要是istio-system下,这个相当于是转发。

    配置好后就能在kiali中看见图形了

  • 相关阅读:
    判断上传的文件是否为图片
    P17 更多文件操作
    p16 读写文件
    VMWare Workstation 7.1.2.301548
    Oracle SQL Developer语言设置
    HTC Android 存储卡文件夹
    CentOS 添加EPEL
    Silverlight应用程序的本地通讯
    SQL Server 2008 R2 序列号
    VMware 7 注册码
  • 原文地址:https://www.cnblogs.com/Tempted/p/14144073.html
Copyright © 2020-2023  润新知