We have a question about the Istio ingressgateway. We have (in our opinion) a rather typical setup where we do TLS termination in the Istio ingressgateway (example.com in the diagram) and then route the traffic to internal Kubernetes services based on hostnames and URLs. So far, so good.
Now we have the requirement to send certain traffic, based on URL prefixes, to an external HTTPS service (example2.com in the diagram). We know how to do TLS origination, and it works quite well from within the mesh (e.g. a curl command in a bash shell running inside a pod with sidecar). But we can’t get it to work from the ingress gateway.
To put it in different words: we want HTTPS requests to be decrypted by the ingress gateway, it should look at hostname and path prefix and proxy certain traffic to an external HTTPS service. Here’s a diagram that explains it:
Is that possible to implement with Istio? We have tried many combinations with ServiceEntry and DestinationRules, but the ingressgateway fails to do the TLS origination (which works fine from pods in the mesh)
Hi @ceastman-ibm, thank you for the reply! I did already have a traffic policy. I took the time to simplify our configuration and make it possible to run it in Docker Desktop. I especially wanted to try if the latest version of Istio makes a difference (we are still on 1.5.8 in our system). To further simplify, I removed the TLS on the frontend and the URL prefix matching. Here’s the current config:
$ curl localhost/get -H "Host: httpbin.example.com"
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
</body>
</html>
TLS origination from within the mesh works fine, here’s a pod with a sidecar:
the doc for Istio 1.5 is the same as the Istio 1.7 related to egress-tls-origination, did anyone else encounter the same issue with the example provided?