Skip to content

Instantly share code, notes, and snippets.

@qclaogui
Forked from phanama/north-south-traffic.yaml
Created February 22, 2020 10:50
Show Gist options
  • Select an option

  • Save qclaogui/f578b5fd563f09a3fd0e53edfe28594d to your computer and use it in GitHub Desktop.

Select an option

Save qclaogui/f578b5fd563f09a3fd0e53edfe28594d to your computer and use it in GitHub Desktop.
Istio Headless Service North-South Traffic
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: prometheus-server-0
namespace: monitoring
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- cluster-A-prometheus-0.example.com
port:
name: grpc
number: 80
protocol: GRPC
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: prometheus-server-1
namespace: monitoring
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- cluster-A-prometheus-1.example.com
port:
name: grpc
number: 80
protocol: GRPC
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: prometheus-server-0
namespace: monitoring
spec:
gateways:
- prometheus-server-0
hosts:
- cluster-A-prometheus-0.example.com
http:
- match:
- uri:
prefix: /
route:
- destination:
host: prometheus-server-0.prometheus-server-headless.monitoring.svc.cluster.local
port:
number: 10901
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: prometheus-server-1
namespace: monitoring
spec:
gateways:
- prometheus-server-0
hosts:
- cluster-A-prometheus-1.example.com
http:
- match:
- uri:
prefix: /
route:
- destination:
host: prometheus-server-1.prometheus-server-headless.monitoring.svc.cluster.local
port:
number: 10901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment