简体   繁体   English

迁移到Kubernetes,还需要Spring Cloud Eureka / Zuul吗?

[英]Migrating to Kubernetes, still need Spring Cloud Eureka/Zuul?

We are in the process of industrialising our first microservices application which is predominantly built using Spring Boot 2. We are currently using Spring Cloud Zuul for our routing and Eureka for service discovery. 我们正在工业化我们的第一个主要使用Spring Boot 2构建的微服务应用程序。我们目前正在使用Spring Cloud Zuul进行路由,并使用Eureka进行服务发现。

We are looking to use Kubernetes on AWS (using EKS). 我们希望在AWS上使用Kubernetes(使用EKS)。 My question is there still value of running Eureka and Zuul for service discovery/routing or can they be replaced by Kubernetes. 我的问题是,运行Eureka和Zuul对于服务发现/路由仍然有价值,或者可以用Kubernetes代替它们。

It all depends on what you want to achieve here. 这完全取决于您要在这里实现的目标。

If you have existing applications that are registering themselves with Eureka and you want to use those services, then I'd say yes to have as little impact as possible. 如果您有正在向Eureka注册的现有应用程序,并且想要使用这些服务,那么我想说是,以尽量减少影响。 If you are only going to use Kubernetes then it could make sense to use its registry. 如果您只打算使用Kubernetes,那么使用其注册表可能是有意义的。 Although there are others (eg. Consul, Eureka, Zookeeper) who would be a better candidate in case you want to have a hybrid system, or if you want to move from Kubernetes to X in the future. 尽管还有其他人(例如Consul,Eureka,Zookeeper)在您想要使用混合系统,或者将来希望从Kubernetes迁移到X时会是更好的选择。

If you want to have an API gateway as entrypoint, then there are a lot of different solutions (Spring Cloud Gateway, Apigee, haproxy, nginx,...) with which you can use the cloud platform load balancers too. 如果您希望将API网关作为入口点,那么可以使用云平台负载平衡器,有很多不同的解决方案(Spring Cloud Gateway,Apigee,haproxy,nginx等)。 Basically you create routes between the endpoint in your API gateway and the address of the load balancer of Kubernetes (service). 基本上,您可以在API网关中的端点与Kubernetes(服务)的负载平衡器的地址之间创建路由。 Now if you want to use smart load balancing, eg. 现在,如果您想使用智能负载平衡,例如。 using the circuitbreaker pattern, then I'd leverage the power of service discovery and client-side load balancing and stop using the load balancer of the platform. 使用电路断路器模式,然后利用服务发现和客户端负载均衡的功能,并停止使用平台的负载均衡器。 In the end it all comes down to what functionality you need. 最后,一切都取决于您需要什么功能。

One thing to note is that most of the Spring Cloud Netflix components have entered maintenance mode, see this post: https://spring.io/blog/2019/01/23/spring-cloud-greenwich-release-is-now-available#spring-cloud-netflix-projects-entering-maintenance-mode 需要注意的一件事是,大多数Spring Cloud Netflix组件已进入维护模式,请参阅以下文章: https : //spring.io/blog/2019/01/23/spring-cloud-greenwich-release-is-now-可用#弹簧云Netflix的项目进入维护模式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM