spring-cloud-kubernetes: FeignClients do not currently work without the spring-cloud-kubernetes-ribbon implementation

Using the latest version of Spring Cloud Kubernetes without the spring-cloud-kubernetes-ribbon implementation causes FeignClients to not work:

com.netflix.client.ClientException: Load balancer does not have available server for client: my-awesome-service

Services are running in the same Kubernetes cluster, same namespace and was working with the spring-cloud-kubernetes-ribbon implementation.

The current project is set up with Hoxton.SR5 and :


    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-kubernetes-all</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-openfeign</artifactId>
    </dependency>
...

 <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${versions.spring-cloud}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
  </dependencyManagement>

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (9 by maintainers)

Most upvoted comments

No, you have to change the url in your project to https

Aha! Fixing the permissions did make the sample app work now! Thanks for all the help @piomin. Also thanks for pointing me to:

<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-server-mock</artifactId>
    <scope>test</scope>
</dependency>

yes, hence the mention of #516

Thanks @spencergibb! Based on what @ryanjbaxter mentioned, I think eventually we will not be able to use spring-cloud-kubernetes-ribbon so I’m kinda trying to understand how this would work on the next major version. Should I be using spring-cloud-starter-loadbalancer instead?