I am working on a demo project , which has 5 microservices - discovery server , api-gateway , user-order-detail , order and user service.
I will expose the order and user service internally
I will expose the user-order-detail service externally which will call the other two services using a rest endpoint.
1) Should I deploy discovery server and api gateway on kubernetes engine and if not how will the routing be handled ?
If I do not deploy the api-gateway , how will this rest call take place ?
2) Also as there is a application.properties file in every spring-cloud project. Does docker image replace the application.properties file ?
3) I am using docker and kubernetes for the first time.Can someone explain what should be my next step after creating the docker images for my services ? (just the steps , I will figure out how to complete those steps)
UPDATE:
Services that are up:
user-order-detail LoadBalancer
kubernetes ClusterIP
order-management LoadBalancer
user-management LoadBalancer
user-order-detail hits an endpoint to retrieve all users. I am getting this error :No matches for the virtual host name :user-management
Beside an API Gateway, you can also use an Ingress for exposing your services. Ingress is more likely a native solution at kubernetes because it uses kubernetes syntax for configuring, means you don't need much refactoring when you want to change the gateway (ingress). you can compare ingresses available here :
If you still want an API Gateway, I recommend to use this as this use envoy and it 's built natively for kubernetes
Please find the answers below:-
1) Yes, you can deploy discovery service and api-gateway on kubernetes engine and please go through this document in regards which type of service you will expose.
Services:- https://kubernetes.io/docs/concepts/services-networking/service/
2) You can copy the application.properties file while building the image or if you want to override at the run time. Please create a configMap in Kubernetes and inject into the Kubernetes pod by volume. Please follow below links on ConfigMap.
3) Steps to do after creating images:-