Skip to content

Instantly share code, notes, and snippets.

@phanama
Created August 22, 2019 04:34
Show Gist options
  • Save phanama/f98d3fbe5206582d9cc9ce52241ca671 to your computer and use it in GitHub Desktop.
Save phanama/f98d3fbe5206582d9cc9ce52241ca671 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