I have a spring boot microservice alpha-service
running in the k8s dev namespace. The clients are directly accessing the API exposed in this service by the endpoint https://host-name/tech/alpha-service/v1/get-user-details
Similarly, I have 4 other microservices as well (5 in total).
I have already created a spring boot eureka registry service which is running fine in the same k8s dev namespace. The microservice is registered there with the name ALPHA-SERVICE
on the eureka dashboard
.
Now, I want to create a spring boot api gateway, running in the same k8s dev namespace as other microservices, which will intercept all the incoming requests to all of my microservices which the clients are consuming and further decide at the runtime (based on the registered path) which microservice the request need to be sent to after referring the eureka service registry.
During this transition, I don’t want the existing endpoints in any of the microservice which the clients are currently using to be changed.
Note: All the endpoints in all the microservices have the following part common https://host-name/tech/
What are the different ways in which I can achieve this?