How to route all outbound traffic to egressgateway

Hello,

Looking at the istio documentation for egress-gateway (sorry I can’t post the link here), it looks like the recipe for directing HTTP(S) traffic through an egress gateway is:

  1. a service entry for a specific external host (i.e. edition.cnn.com)
  2. an egress gateway for the service
  3. a destination rule for traffic routed to the egress gateway
  4. a virtualservice to direct traffic from the sidecars to the egress gateway, and from the egress gateway to the external service

This is fine when we are only routing for specific external services, as in the example. But what if I have an outbound traffic policy of ALLOW_ANY and want to route all outgoing traffic in a namespace to istio-egressgateway.istio-system.svc.cluster.local? I can’t create a virtualservice with host set to *, this doesn’t work.

* wildcard host * is not allowed for virtual services bound to the mesh gateway

Thanks in advance

I’ve tried too to achieve this with no success. There’s no way imho to do this with Istio. I’ll have to try with AWS nat gateway or Calico