首页 > 其他分享 >开放grafana至集群外部

开放grafana至集群外部

时间:2022-08-17 09:58:15浏览次数:56  
标签:name 外部 system istio --- 集群 io grafana

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

相关文章