<p>What are the benefits to use &quot;spring service discovery kubernetes&quot; instead of using directly the Service DNS coming from Kubernetes?</p>
<p>I mean, If I deploy in kubernetes 2 services (service-a and service-b), and service-b exposes a Rest API.
service-a can easily connect to service-b using the url &quot;http://service-b/...&quot;.</p>
<p>Question #1. In order to let service-a be able to connect to service-b using the service DNS, service-b has to be deployed before service-a?</p>
<p>Question #2. What are the pros/cons using the spring discovery?</p>

Fabry
<p><strong>Question #1:</strong>
No, the order in which you deploy the services is not important to use the kubernetes DNS services to resolve the ips, the only thing here is that if you deploy serviceA after serviceB, you will have in serviceA as an environment variable the ip of serviceB but not the inverse.</p>
<p><strong>Question #2:</strong>
The spring service discovery is an alternative to the native kubernetes service discovery and it is used by other spring cloud projects like spring-cloud-eureka to perform the service discovery. The only pros I see in this approach is that you can custom the load balancing algorithm tath you can use to spread the load among the different instances</p>
