You have multiple microservices each exposing REST APIs as separate Kubernetes Services. To avoid breaking API consumers and third-party integrations when releasing new API versions, how should you route requests?
Choose an answer
Tap an option to check your answer.
Correct answer: Use an Ingress that routes requests by the API URL to the appropriate backend..
Why this is the answer
An Ingress controller is the most suitable solution for routing requests based on the API URL. It allows you to define rules that map specific URL paths or hostnames to different backend Kubernetes Services, enabling seamless versioning and traffic management without impacting clients. For example, /v1/users can route to the user-service-v1 and /v2/users to user-service-v2. Service discovery systems primarily help microservices find each other within the cluster, not typically for external routing based on API versions. Deploying multiple clusters for versioning is overly complex and expensive for this specific problem. Combining multiple API versions in the same Service and requiring client specification in POST requests is not a standard or robust way to manage API versions for REST APIs, as it forces client-side logic for routing and doesn't handle GET requests effectively.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed