Istio 1.0.2在浏览器上访问grafana
我已使用以下命令在GKE上部署了istio:Istio 1.0.2在浏览器上访问grafana,grafana,istio,Grafana,Istio,我已使用以下命令在GKE上部署了istio: helm template istio-1.0.2/install/kubernetes/helm/istio --name istio --namespace istio-system --set global.mtls.enabled=true --set tracing.enabled=true --set servicegraph.enabled=true --set grafana.enabled=true --set telemetry
helm template istio-1.0.2/install/kubernetes/helm/istio --name istio --namespace istio-system --set global.mtls.enabled=true --set tracing.enabled=true --set servicegraph.enabled=true --set grafana.enabled=true --set telemetry-gateway.grafanaEnabled=true > istio.yaml
但是我不知道如何在浏览器上访问grafana。
我不想使用端口转发。。这不是一个现实世界的解决方案。
我使用了以下网关和virtualservice定义。
但我无法访问浏览器上的Grafana用户界面。。非常感谢您的帮助
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: grafana-gateway
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 15031
name: http-grafana
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: grafana
spec:
hosts:
- "grafana-test"
gateways:
- grafana-gateway
#- mesh
http:
- route:
- destination:
host: "grafana.istio-system.svc.cluster.local"
port:
number: 3000
您必须根据@Vadim Eisenberg的建议,通过将主机更改为值
“*”
来调整IstioVirtualService
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: grafana
spec:
hosts:
- "*"
gateways:
- grafana-gateway
#- mesh
http:
- route:
- destination:
host: "grafana.istio-system.svc.cluster.local"
port:
number: 3000
我已经检查了我的GKE环境,它正在按预期工作:
$export-ingres\u HOST=$(kubectl-n istio系统获取服务istio-ingresgateway-o jsonpath='{.status.loadBalancer.ingres[0].ip}')
$curl-I-H“主机:grafana.istio system.svc.cluster.local”http://$INGRESS\u主机:15031
HTTP/1.1 200 OK内容类型:text/html;字符集=UTF-8集cookie:
grafana_sess=3b7c8eda239f6bb2;路径=/;HttpOnly日期:2018年10月29日星期一
13:48:14格林尼治标准时间x-embasic-upstream-service-time:6服务器:embasic
传输编码:分块
您必须根据@Vadim Eisenberg的建议,通过将主机更改为值
“*”
来调整IstioVirtualService
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: grafana
spec:
hosts:
- "*"
gateways:
- grafana-gateway
#- mesh
http:
- route:
- destination:
host: "grafana.istio-system.svc.cluster.local"
port:
number: 3000
我已经检查了我的GKE环境,它正在按预期工作:
$export-ingres\u HOST=$(kubectl-n istio系统获取服务istio-ingresgateway-o jsonpath='{.status.loadBalancer.ingres[0].ip}')
$curl-I-H“主机:grafana.istio system.svc.cluster.local”http://$INGRESS\u主机:15031
HTTP/1.1 200 OK内容类型:text/html;字符集=UTF-8集cookie:
grafana_sess=3b7c8eda239f6bb2;路径=/;HttpOnly日期:2018年10月29日星期一
13:48:14格林尼治标准时间x-embasic-upstream-service-time:6服务器:embasic
传输编码:分块
1.尝试在VirtualService 2的
hosts
字段中使用*
。验证您是否访问了正确的端口-请参阅感谢您的建议。。不幸的是,我无法将您的回答标记为“已接受的答案”。您的回答不是“回答”我的问题1。尝试在VirtualService 2的hosts
字段中使用*
。验证您是否访问了正确的端口-请参阅感谢您的建议。。不幸的是,我无法将您的回答标记为“已接受的答案”。您已回答而不是“回答”我的问题