【发布时间】:2021-04-15 12:10:18
【问题描述】:
我使用以下命令调出 pod:
kubectl create deployment grafana --image=docker.io/grafana/grafana:5.4.3 -n monitoring
然后我使用以下命令创建 custerIp:
kubectl expose deployment grafana --type=ClusterIP --port=80 --target-port=3000 --protocol=TCP -n monitoring
然后我使用了下面的虚拟服务:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: grafana
spec:
hosts:
- "*"
gateways:
- cogtiler-gateway.skydeck
http:
- match:
- uri:
prefix: /grafana
route:
- destination:
port:
number: 3000
host: grafana
kubectl apply -f grafana-virtualservice.yaml -n monitoring
输出:
virtualservice.networking.istio.io/grafana created
现在,当我尝试访问它时,我从 grafana 收到以下错误:
**If you're seeing this Grafana has failed to load its application files
1. This could be caused by your reverse proxy settings.
2. If you host grafana under subpath make sure your grafana.ini root_path setting includes subpath
3. If you have a local dev build make sure you build frontend using: npm run dev, npm run watch, or npm run build
4. Sometimes restarting grafana-server can help **
【问题讨论】:
-
您是否尝试过安装prometheus and grafana addons并使用由istio创建的网关和虚拟服务yamls?
-
这不是插件,这是用于k8s监控的grafana的独立安装
标签: kubernetes grafana kubernetes-ingress istio istio-sidecar