Google Kubernetes引擎-Prometheus和Grafana的入口无法正常工作

问题描述

我正在尝试在GKE的K8集群上安装和访问Promethues和Grafana。

  • 我创建了具有3个节点的集群。
  • 已安装头盔
  • 从稳定的仓库中安装Prometheus Operator图表
  • 将服务的节点类型从ClusterIp更改为NodePort 普罗米修斯-运算符-160067-普罗米修斯 prometheus-operator-1600675914-grafana
  • 使用此Yaml创建了一个入口
    apiVersion: networking.k8s.io/v1beta1
    kind: Ingress
    metadata:
      name: my-ingress1
      annotations:
        # If the class annotation is not specified it defaults to "gce". 
        kubernetes.io/ingress.class: "gce"
    spec:
      rules:
      - http:
          paths:
          - path: /prometheus
            backend:
              serviceName: prometheus-operator-160067-prometheus 
              servicePort: 9090
          - path: /grafana
            backend:
              serviceName: prometheus-operator-1600675914-grafana
              servicePort: 80

创建了入口服务后,gke仪表板看起来像http://prntscr.com/ul18uf。 但是,当我呼叫新端点时,收到消息“ 404页面未找到” http://prntscr.com/ul1bsm

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)