0

I have a Kubernetes cluster with one master node and two slave nodes. I have deployed Eureka server and Zuul on it. Both of them have two replicas, one on each node. I have used Zuul here to enable load balancing among both the nodes.

In order to make Zuul work with Eureka, it is needed to register Zuul with Eureka. Eureka server is deployed using the 'springcloud/eureka' docker hub repository and Zuul is deployed using 'netflixoss/zuul' repository.

The Zuul pod has a zuul-test.properties in which I have specified the eureka URL to register. But it is not showing in the Eureka dashboard. Hence, I decided to restart Zuul service in the Kubernetes cluster but the way I restarted it, is removing all the configuration I have put on additionally in Zuul to connect with Eureka.

Can anybody tell me how we can restart the Zuul service in the containers without removing the additional configuration that I had done?

Rico
  • 58,485
  • 12
  • 111
  • 141
Aditya Datta
  • 567
  • 2
  • 7
  • 17
  • Not your question but I don't think you need Zuul to have load-balancing across nodes. If you use Kubernetes Services then the traffic should be load-balanced across the Pods – Ryan Dawson Oct 31 '18 at 09:07
  • I'd suggest using the spring cloud versions for both Zuul and eureka and not mixing Spring cloud and Netflix versions. You are probably best to build the images yourself with your own properties file config. See https://stackoverflow.com/questions/52066141/zuul-unable-to-route-traffic-to-service-on-kubernetes – Ryan Dawson Oct 31 '18 at 09:11
  • You are correct regarding services but I guess that can be done when we select type as 'LoadBalancer' but I think its chargeable. I am using NodePort for this. As per my knowledge, we can access the service using NodePort in a particular node itself. Ex - If we deploy nginx and create replicas which are deployed on both the nodes and if we try to access nginx using a particular node IP, then it will show the nginx of that particular node rather than doing load balancing and showing nginx of both the nodes. – Aditya Datta Oct 31 '18 at 09:18
  • I meant the internal traffic within the cluster for ClusterIP services ( https://stackoverflow.com/questions/49888133/kubernetes-service-cluster-ip-how-is-this-internally-load-balanced-across-diffe ) – Ryan Dawson Oct 31 '18 at 09:27
  • Hi Ryan , I tried to find the spring cloud version for zuul but unfortunately it is not available. Hence, I have to use the Netflix version itself. I may be wrong but I guess it should not create an issue as we need to register it on eureka and that totally depends on config file. The URL for this iamge file is 'https://hub.docker.com/r/netflixoss/zuul/' – Aditya Datta Oct 31 '18 at 12:56

0 Answers0