I'm trying to configure the cloudflared tunnel to work with Istio. Istio Ingress Gateway uses SNI to match the request on where it routes traffic to. I can't seem to figure out a way that I could pass SNI information from cloudflared tunnel -> the origin automatically.
I can see that Host headers come through without issue. Is there a way to automatically get the SNI information from the original user request and pass it through?
I can manually hardcode it for every entry as a workaround for now.
What I'm trying to achieve:
credentials-file: "/var/run/cloudflared/<id>.json"
ingress:
- hostname: "*.mydomain.io"
service: https://istio-ingressgateway.istio-system.svc.cluster.local
- service: http_status:404
tunnel: <id>
But this doesn't work and it's essentially the equivalent of this:
curl -v -HHost:host1.mydomain.io https://istio-ingressgateway.istio-system.svc.cluster.local
My current workaround:
credentials-file: "/var/run/cloudflared/<id>.json"
ingress:
- hostname: "host1.mydomain.io"
originRequest:
originServerName: host1.mydomain.io
service: https://istio-ingressgateway.istio-system.svc.cluster.local
- hostname: "host2.mydomain.io"
originRequest:
originServerName: host2.mydomain.io
service: https://istio-ingressgateway.istio-system.svc.cluster.local
- service: http_status:404
tunnel: <id>
Now this works and is the equivalent of:
ISTIO_IP=$(dig +short istio-ingressgateway.istio-system.svc.cluster.local)
curl -v -HHost:host1.mydomain.io--resolve "host1.mydomain.io:443:$ISTIO_IP" https://host1.mydomain.io -k
But I have to manually set every entry. Is there way to configure the cloudflared to pass SNI to the backend?
I'm trying to configure the cloudflared tunnel to work with Istio. Istio Ingress Gateway uses SNI to match the request on where it routes traffic to. I can't seem to figure out a way that I could pass SNI information from cloudflared tunnel -> the origin automatically.
I can see that Host headers come through without issue. Is there a way to automatically get the SNI information from the original user request and pass it through?
I can manually hardcode it for every entry as a workaround for now.
What I'm trying to achieve:
But this doesn't work and it's essentially the equivalent of this:
My current workaround:
Now this works and is the equivalent of:
But I have to manually set every entry. Is there way to configure the cloudflared to pass SNI to the backend?