<p>I'm trying out a very simple Istio setup on a Docker Desktop Kubernetes installation.</p>

<p>I have 2 Spring boot micro services and have deployed these 2 services in my K8s "cluster" without any replication. All I have in my YAML file is the Service and Deployment for both services.</p>

<p>I have installed istio and I can see there are 2 containers in my pod. One is the spring boot application, the other is the istio sidecar.</p>

<p>I am making a rest call from service 2 to service 1 like this and it works fine.</p>

<pre><code>restTemplate.exchange("http://service1:8080/getSomeString", HttpMethod.GET, null, String.class, new Object()).getBody();
</code></pre>

<p>However, now if I disable sidecar injection and rededloy me services, it still works fine. Basically it is Kubernetes that is resolving where service1 is and completing the rest call and Not istio.</p>

<p>How do I do service discovery using istio ?</p>

<p>Istio is a Service Mesh, as such it isn't responsible for service discovery. A service mesh adds functionality to the Service -> Service traffic (monitoring, routing, etc). So when running on a Kubernetes cluster, Kubernetes continues to be responsible for service discovery, as you've observed.</p>

<p>As Arghya's answer states, with Istio you can apply a VirtualService on top of this, which allows you to do "clever" additional features such as custom routings, but this in no way replaces or changes the functionality of the underlying Kubertetes Service Discovery. </p>

<p>In my opinion, VirtualService is a confusing term because it sounds like it's somehow replacing Kubernete's existing features. I prefer to think of a VirtualService as "Custom Routing".</p>

<p>By the way, you only need a virtualservice if you need one. By which I mean, you might have 1,000 services defined in your cluster (using the normal Kubernetes Service construct). But perhaps you want to apply custom routing rules to just one service - that's fine, you just define 1 VirtualService in Istio to handle that. </p>
