<p>Now I am testing the scenario running apps on Istio.<br>
I cant access to legacy codes, so I cant change request urls.</p>

<p>For that, I made some simple apps.       </p>

<p>I am not sure this scenario is available on Istio.  </p>

<p>I have two applications(order and customer)
On the order app, there is code calling customer app with url  "<a href="http://customer-app:8080/customer" rel="nofollow noreferrer">http://customer-app:8080/customer</a>".</p>

<p>Now, I want to run two apps on K8S with Istio.<br>
And I don't want to change my code especially calling urls.<br>
(I know I can call each service with service-name.<br>
but I want to make customer service name with "customer-service" not "customer-app")  </p>

<p>I find there is a VirtualService which can register MESH_INTERNAL.<br>
I make yaml file like that.   </p>

<pre><code>apiVersion: networking.istio.io/v1alpha3   
kind: ServiceEntry   
metadata:  
  name: customer-service-entry  
spec:  
  hosts:  
  - http://customer-app:8080  
  location: MESH_INTERNAL  
  ports:  
  - number: 8080  
    name: http  
    protocol: http  
  endpoints:  
  - address: customer-service  
    ports:  
      http: 8080  
</code></pre>

<p>is it possible scenario using virtual domain? </p>

sury
<p>You should be able to do this using a <code>VirtualService</code>:</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: customer-app
spec:
  hosts:
  - customer-app
  http:
  - match:
    - port: 8080
    route:
    - destination:
        host: customer-service
        port:
          number: 9080
</code></pre>

<p>You will also need to define a dummy K8S service for customer-app, so that it's resolvable:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: customer-app
spec:
  ports:
  - port: 8080
    name: http
</code></pre>
