I installed a multi cluster Istio mesh as defined in Istio / Install Primary-Remote. Installed Istio 1.9.1. Here are IstioOperator
configurations,
primary.yaml
kind: IstioOperator
metadata:
name: istio-control
spec:
components:
ingressGateways:
- name: istio-eastwestgateway
enabled: true
k8s:
env:
# traffic through this gateway should be routed inside the network
- name: ISTIO_META_REQUESTED_NETWORK_VIEW
value: network1
service:
loadBalancerIP: "10.1.2.3"
ports:
- name: status-port
port: 15021
targetPort: 15021
- name: tls
port: 15443
targetPort: 15443
- name: tls-istiod
port: 15012
targetPort: 15012
- name: tls-webhook
port: 15017
targetPort: 15017
values:
global:
meshID: mesh1
multiCluster:
clusterName: control-plane-cluster
network: network1
pilot:
env:
PILOT_ENABLE_WORKLOAD_ENTRY_AUTOREGISTRATION: true
PILOT_ENABLE_WORKLOAD_ENTRY_HEALTHCHECKS: true
gateways:
istio-ingressgateway:
serviceAnnotations:
networking.gke.io/load-balancer-type: "Internal"
networking.gke.io/internal-load-balancer-subnet: "ilb-subnet"
remote.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
profile: remote
components:
ingressGateways:
- name: istio-ingressgateway
enabled: true
k8s:
service:
loadBalancerIP: "10.1.2.4"
serviceAnnotations:
networking.gke.io/internal-load-balancer-allow-global-access: "true"
values:
global:
meshID: mesh1
multiCluster:
clusterName: remote-cluster
network: network1
remotePilotAddress: 10.1.2.3
gateways:
istio-ingressgateway:
serviceAnnotations:
networking.gke.io/load-balancer-type: "Internal"
networking.gke.io/internal-load-balancer-subnet: "ilb-subnet"
As you can see, we are exposing an Istio Ingress Gateway (IGW) in remote cluster. The IGW is configured to internal DNS say, *.remote.example.com
. Using this IGW, we want to expose a service-a
in remote cluster externally. As per Istio config, we need Gateway
and VirtualService
configurations. Here are those configs,
gateway and virtualservice
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: service-a-gw
namespace: service-a-namespace
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- service-a.remote.example.com
port:
name: http
number: 80
protocol: HTTP
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: service-a-vs
namespace: service-a-namespace
spec:
gateways:
- service-a-gw
hosts:
- service-a.remote.example.com
http:
- route:
- destination:
host: service-a.service-a-namespace.svc.cluster.local
Ideally, I would like to create above configs in service-a-namespace
of remote cluster, as I want to expose service in remote-cluster
cluster using a Istio Ingress Gateway in remote-cluster
.
If I create them in remote cluster, it is not working. IGW is not receiving requests for url service-a.remote.example.com
.
But, if I create above configs in control-plane
cluster under the namespace service-a-namespace
, it works. I am able to send requests to IGW in remote cluster using url service-a.remote.example.com
.
This is confusing. My service is in remote cluster and I would like to create all configs for that service in local cluster, which is a remote-cluster
cluster.
Can you please help me understand if it is a bug in Istio or if I am missing any configuration?