Question 91 · 357 in bank
You are designing an application that consists of several microservices. Each microservice has its own RESTful API and will be deployed as a separate Kubernetes Service. You want to ensure that the consumers of these APIs aren't impacted when there is a change to your API, and also ensure that third-party systems aren't interrupted when new versions of the API are released. How should you configure the connection to the application following Google-recommended best practices?
Show answer
Answer: A
Explanation
B,C, and D can be eliminated B. Service discovery only works within the cluster itself, so external clients can't use it C. Using multiple clusters is an overkill, you can deploy multiple version of the same service within a single cluster D. Passing the API version in the request body is not a REST best practice The best practice is to pass the version of the API in the the URL path, e.g /v1/foo, /v2/foo Using this approach, you can route requests to the appropriate backend service within the GKE cluster using an Ingress resource, which is option A.
Source: Adapted from community discussion — micoams