I was setting up microservices based on Netflix Eureka and experimenting on top of spring-cloud and after weeks of research and development the question rose!
Why do I need the Eureka and spring-cloud?
Why not developing your independent containers and deploy them on Kubernetes as pods and maintain everything from there?
You can support load balancing, service registery, monitoring, containerization, etc. from Kubernetes too.
Here are some points that I can think of:
Eureka (Ancient Greek: εὕρηκα) is an interjection used to celebrate a discovery or invention. It is a transliteration of an exclamation attributed to Ancient Greek mathematician and inventor Archimedes.
The Eureka server is nothing but an implementation of service discovery pattern, where microservices can register themselves so others can discover them. This server holds information about the client service applications.
With Netflix Eureka, each client can simultaneously act as a server to replicate its status to a connected peer. In other words, a client retrieves a list of all connected peers in a service registry, and makes all further requests to other services through a load-balancing algorithm.
Zuul acts as the API gateway, providing a uniform, single point of entry into the set of microservices, while Eureka is essentially used as a “meta data” transport. Each client application instance (read microservice) registers its instance information (location, port, etc.)
I conclude and the top highlights for the reason why using Eureka
and/or Kubernetes
can be listed as:
So,
If you need some of your microservices in an other language or you can rely on your developers knowledge on
Kubernetes
are not afraid to spend a bit more time and money investing in your tech stack to have a wider and less dependent system thenKubernetes
is the way to go.
On the other hand
If you need a fast development well integrated with spring-boot stack with easy to use Java annotations without large involvement of DevOps then and less resource to train your developers then go for Eureka and spring-cloud stack.
for more details and comparison charts and features list please refer to this article.
On Kubernetes you don't need to, you could use those features from the Kubernetes platform.
If you want to integrate closer with spring cloud you can have a look at: https://github.com/spring-cloud-incubator/spring-cloud-kubernetes
Most of the requested features can be provided by Kubernetes Services. These get exposed as environment variables to the pods or you could use Kube DNS to find the needed services.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With