<p>I would like to deploy a RESTService in kubernetes behind a gateway and a service discovery. There is a moment where I will have my RestService version 1 and my RestService version 2. </p>

<p>Both will have the exact same URLs, but I might deploy them in pods where I label the version. When I make a call to the RESTService I would like to add something in the HTTP header indicating that I want to use my V2.</p>

<p>Is there any way I can route the traffic properly to the set of pods? (I'm not sure if using label is the right way). I also have to keep in mind that in the future I will have a V3 with new services and my urls will change, it cannot be something configured statically. I will also have serviceA with v1
and servicesB with v3. Both behind the same service discovery, both must be routed properly using the header parameter (or similar).</p>

<p>I'm not sure if Envoy is the right component for this, or is there anything else? and I'm not sure in which moment I should place this component. 
I'm missing something, I'm still quite confused with kubernetes. Does anybody have and example from something similar?</p>

Elena
<p>Yes, a Service takes a label selector, which you can use if you set labels based on your versions. Most Ingress Controllers or other proxies than use a Service (or rather then Endpoints it manages) to pick the backend instances.</p>
