how does zuul work without eureka and ribbon for dynamic destination from kubernetes

11/16/2016

I am a beginner of using Zuul. I would like to create a http proxy for dynamic destination (ip address) from kubernetes. I checked Can Zuul Edge Server be used without Eureka / Ribbon which is helpful, but I don't want to specify lists-of-servers.

What I have now is a simpleRouteFilter extends ZuulFilter based on spring-boot. In the filter, it will change the destination ip address according to what I get from kubernetes. And I also turn off the eureka stuff by using ribbon.eureka.enabled=false.

The problem is that it looks good in the local environment, but after I deploy the project into kubernetes, it will show Load balancer does not have available server for client: sample-all-services, but it indeed works. The reason why I put a sample-all-service (service id) there is that when I remove zuul config in the properties, the zuul function doesn't work properly. And I know that I didn't put any server for that id because it's dynamic.

Question: (1) Is Zuul fit in my scenario? (2) if yes, how to tune Zuul confguration to accept all the http requests without showing load balancer not available warn. (3) Is that something related to the kubernetes?

The yaml file is:
zuul:
  routes:
    sample-all-services:
      path: /**

server:
  port: 8080

ribbon:
  eureka:
    enabled: false

sample-all-services:
  ribbon:
    ReadTimeout: 15000

Thanks.

-- HAO
kubernetes
load-balancing
netflix-ribbon
netflix-zuul

0 Answers