<p>I am working on a demo project , which has 5 microservices - discovery server , api-gateway , user-order-detail , order  and user service.</p>

<p>I will expose the order and user service internally </p>

<p>I will expose the user-order-detail service externally which will call the other two services using a rest endpoint.</p>

<p>1) Should I deploy discovery server and api gateway on kubernetes engine and if not how will the routing be handled ?</p>

<p>If I do not deploy the api-gateway , how will this rest call take place ?</p>

<p><a href="https://i.stack.imgur.com/DY0ER.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DY0ER.png" alt="enter image description here"></a></p>

<p>2) Also as there is a application.properties file in every spring-cloud project. Does docker image replace the application.properties file ?</p>

<p>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)</p>

<p><strong>UPDATE:</strong></p>

<p><strong>Services that are up:</strong></p>

<p>user-order-detail  LoadBalancer<br>
kubernetes         ClusterIP<br>
order-management   LoadBalancer<br>
user-management    LoadBalancer   </p>

<p>user-order-detail hits an endpoint to retrieve all users.
<strong><em>I am getting this error :No matches for the virtual host name :user-management</em></strong></p>

<p>Please find the answers below:-</p>

<p>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.</p>

<blockquote>
  <p>Services:- <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/</a></p>
</blockquote>

<p>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.</p>

<blockquote>
  <p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume</a></p>
  
  <p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume</a></p>
</blockquote>

<p>3) Steps to do after creating images:-</p>

<ol>
<li>Push the image to registry</li>
<li>Deploy the pod on kubernetes</li>
<li>Create a service to expose the pod</li>
</ol>
