kubectl apply -f ./
[root@k8s-master grafana]# cat grafana-gateway.yaml
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: grafana-gateway
namespace: istio-system
spec:
selector:
app: istio-ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "grafana.magedu.com"
---
[root@k8s-master grafana]# cat grafana-virtualservice.yaml
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: grafana-virtualservice
namespace: istio-system
spec:
hosts:
- "grafana.magedu.com"
gateways:
- grafana-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
host: grafana
port:
number: 3000
---
[root@k8s-master grafana]# cat grafana-destinationrule.yaml
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: grafana
namespace: istio-system
spec:
host: grafana
trafficPolicy:
tls:
mode: DISABLE
---
标签:name,外部,system,istio,---,集群,io,grafana From: https://www.cnblogs.com/zyyang1993/p/16593911.html