简体   繁体   中英

Use an existing microservice architecture with kubernetes

I've an existing microservice architecture that uses Netflix Eureka and zuul services,

I've deployed a pod that successfully registers on the discover server but when I hit the API it gives a timeout, what I can think is that while registering on the Discovery server the container IP is given because of which it is not accessible.

Is there a way to either map the correct address or redirect the call to the proper URL looking for a easy way, as this needs to be done on multiple services

I think you should be rethinking your design in Kubernetes way! Your Eureka(service discovery), Zuul server (API gateway/ Loadbalancer) are really extra services that you really don't need in the Kubernetes platform.

For Service discovery and load-balancing, you can use Services in Kubernetes. From Kubernetes documentation:

An abstract way to expose an application running on a set of Pods as a network service. With Kubernetes, you don't need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods and can load-balance across them.

And for API gateway, you can think about Ingress in Kubernetes. There are different implementations for Ingress Controllers for Kubernetes. I'm using Ambassador API gateway implementation.

https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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