I’ve an existing service exposed via LoadBalancer; which I can access no issues up until this point.
Roughly the routing is : Load Balancer > Gateway > Virtual Service > Service
The config of the first Gateway & VirtualService looks like this -
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gw1
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- ns1/*
port:
name: http
number: 80
protocol: HTTP
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: vs1
namespace: ns1
spec:
gateways:
- gw1.istio-system.svc.cluster.local
hosts:
- '*'
http:
- match:
- uri:
prefix: /devapi
route:
- destination:
host: devapi-service.ns1.svc.cluster.local
port:
number: 8080
Now in a completely different context I would like to deploy a 2nd service and expose via a separate Gateway/VirtualService.
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gw2
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- istio-system/*
port:
name: http
number: 80
protocol: HTTP
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: vs2
namespace: istio-system
spec:
gateways:
- gw2.istio-system.svc.cluster.local
hosts:
- '*'
http:
- match:
- uri:
prefix: /query
route:
- destination:
host: query-service.istio-system.svc.cluster.local
port:
number: 8080
The above end-point is not accessible.
Ignore for a moment why this service is deployed to istio-system namespace. But my question is this - “Is it possible to deploy more than one gateway attaching itself to istio: ingressgateway ?”