I have a deployment istio is injected in with access to the google maps distance matrix api. If I run the istioctl kube-inject with --includeIPRanges 10.0.0.0/8
it seems to work. If I remove this flag and instead apply a egress rule it won't work:
apiVersion: config.istio.io/v1alpha2 kind: EgressRule metadata: name: google-egress-rule namespace: microservices spec: destination: service: "maps.googleapis.com" ports: - port: 443 protocol: https - port: 80 protocol: http
Both, deployment and Egress rule are in the same namespace (microservices).
Any idea where my fault is?
From what I see by running curl maps.googleapis.com
, it redirects to https://developers.google.com/maps/.
Two issues here:
developers.google.com
curl http://developers.google.com/maps:443
. Istio proxy will open an https connection to developers.google.com
for you. Unfortunately, currently there is no other way to do it, except for using --includeIPRanges
.