<p>We have load balancing, discovery, etc in the Spring cloud. But the same load balancing, discovery is available in Kubernetes as well. So just wanted to know when we should go with Spring cloud (load balancing or discovery) and when to use Kubernetes</p>

Saravana Kumar
<p>It depends on your use-case. There can be situations where you need to directly use <code>Eureka server registry</code> and <code>Eureka client discovery</code> offered by <code>Spring Cloud Netflix</code>. <code>Ribbon</code> is the client side load balancer provided by <code>Spring Cloud Netflix</code>.</p>
<p>In my experience, it is not impossible to use <code>Eureka</code> in any environment. It can be your local data centre or cloud infrastructure. However when it comes to deployment environment, there are so many alternatives for us to achieve the server registry mechanism. Sometimes those alternatives are the best solutions. I will give you an example below...</p>
<p><strong>If you host your application in your local server (Local data centre)</strong></p>
<p>Now in this scenario you can use <code>Eureka</code> and continue your server registry and discovery mechanism. (That is not the only way. I mentioned <code>Eureka</code> for this scenario because it would be a good use case for it)</p>
<p><strong>If you host your application in AWS infrastructure</strong></p>
<p>The <code>AWS</code> environment gives you lots of benefits and services such that you can forget the burden of maintaining and implementing <code>Eureka</code>. You can achieve simply the same behaviour by <code>AWS load balancers</code>, <code>AWS target groups</code> and even more by adding <code>AWS auto scaling groups</code>. In AWS it self there are so many other ways to achieve this as well.</p>
<p>Long story in short that for your scenario, you can continue using the power of <code>Kubernetes</code> and get the privilege unless you have a specific reason to use <code>Eureka</code> and put a large effort to implement it. You should select what suits the best depending on time, effort, maintainability, performance etc.</p>
<p>Hope this helps for you to get an idea. Happy coding!</p>
