I'm trying out a very simple Istio setup on a Docker Desktop Kubernetes installation.
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.
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.
I am making a rest call from service 2 to service 1 like this and it works fine.
restTemplate.exchange("http://service1:8080/getSomeString", HttpMethod.GET, null, String.class, new Object()).getBody();
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.
How do I do service discovery using istio ?