Istio Kubernetes Ingress + CORS Setup

Hi there!

I’m currently in the process of getting Istio + Ingress setup on an environment that previously ran nginx ingress. I went for istio’s kubernetes ingress option instead of the recommended gateway + virtual service approach, due to it’s similarity with what we are already running in the environment (a bunch of kuberenetes ingress resources where I could just change the nginx annotation to an Istio one).

I’ve gone through the process of setting up the ingress and getting cert-manager to work, but I’m stuck trying to configure CORS. Nginx has annotations to configure CORS on the ingress resource, but I haven’t been able to track down something similar on the Istio ingress side of things.

What I’ve tried so far is to create a virtual service as specified here. That didn’t seem to work, and I’m not sure how virtual services interact with istio’s kubernetes ingress.

Would appreciate any help!