Registering Zuul on Eureka in Kubernetes cluster

10/17/2018

I have a Kubernetes cluster on Linux with one master node and two slave nodes. I have installed & created services for a eureka-server and Zuul with multiple replicas which are accessible by NodePorts. In order to enable load balancing, we need to register Zuul service in Eureka.

Can anybody let me know how we can register Zuul on eureka-server?

-- Aditya Datta
kubectl
kubernetes
netflix-eureka
netflix-ribbon
netflix-zuul

1 Answer

10/18/2018

If you look at the configuration for Zuul Service Discovery you can see that there is an option:

eureka.serviceUrl.default=http://${region}.${eureka.eurekaServer.domainName}:7001/${eureka.eurekaServer.context}

You would have to point that option to your eureka-server Kubernetes Service. Based on the DNS Kubernetes convention it would be something like this:

eureka-server-service.<k8s-namespace>.svc.cluster.local:<port-of-service-you-exposed>
-- Rico
Source: StackOverflow