Why do we need Eureka and Spring boot load balancer when using Kubernetes not in the cloud?

Viewed 108

For microservices architecture not in the cloud :

  1. What is the difference between the load balancer of Kubernetes and the load balancer of spring cloud?
  2. what are the advantages of implementing Eureka and spring boot load balancer when using Kubernetes for deployment rather than using Kubernetes load balancer and kubernetes service discovery?
1 Answers

Quite a complex question but here are my thoughts on the matter:

  1. Before actually answering the questions, I must say that my experience setting up Kubernetes load balancer outside of public clouds is a hassle so I wouldn't recommend the approach but, assuming that it is not an issue for you, the main difference is how things are set ut. I would say that the biggest advantage of having it in Kubernetes is that you may also have service mesh solution like Istio that gives you other advantages that just load balancing. Furthermore, it would be easier to do canary (or other special type of) deployments with infrastructure load balancing than with Spring.
  2. The only real advantage I see is if you have different teams with responsibility of the infrastructure, deployment and coding. Say if the Kubernetes team is responsible for creating services, deployments, etc and is overloaded, you might get code out faster if your dev team has capacity and competence but, again, there would be no point using Kubernetes then. Or in case you cannot actually create the LoadBalancer service in Kubernetes (as mentioned - not always straightforward in non cloud env)

On a side note, if you are on the way to deploying Kubernetes internally and want to get it to work, have a look at Metallb

Related