At a previous job, we had a lot of excessive issues with versioning of our APIs, to the point where we had whole server farms for our services that were running specific versions for specific applications, split out in case the Mobile Team updated but the Web team did not (there were about 5 such front end teams so 5 server farms, which was a pain and expensive).
While I don't work for them anymore, I have been working on bringing in another team to use our APIs, and they are notoriously slow on fixing deprecation issues, while our team has been in a pretty rapid development pace. Since we use Azure Kubernetes, I was wanting to do something like this:
Say the endpoint I want to access is /api/user/ and I have multiple versions of this api (let's say V1, V2, V3). How would I go about configuring kubernetes so that the route is /{version}/api/user with the route of /api/user/ going to the "latest" version?
To clarify, let's assume I have deployments for each of these version: Deployment for V1 Deployment for V2 Deployment for V3
I think this issue could be gotten around by doing some kind of routing via tags (we already route based on service domain, so expanding that slightly to include service domain + version shouldn't be bad) but how would I accomplish the concept of the "base" url when they do not provide a version? Is it even a good idea to include a "base" url? (My idea behind this is that our app will always use the latest, but that might be a bad idea).