πŸ”₯ Launch Offer: Interview Preparation Bundle @ β‚Ή2,499 β‚Ή9,999 β€’ 75% OFF. Offer expires in πŸ”₯ Launch Offer: Interview Preparation Bundle @ β‚Ή2,499 β‚Ή9,999 β€’ 75% OFF. Offer expires in Interview Preparation Bundle @ β‚Ή2,499 β‚Ή9,999

00:00:00 Get Bundle
home microservice openfeign-with-kubernetes-do-you-still-need-spring-cloud-loadbalancer
Interview guide Microservice 9 sections

OpenFeign with Kubernetes: Do You Still Need Spring Cloud LoadBalancer?

Yes. This is one of the biggest changes from the old microservice architecture to Kubernetes. Short answer If your microservices are running inside Kubernetes: βœ… Use OpenFeign for…

Start reading
By javainterviewprep June 11, 2026 2 min read

Yes. This is one of the biggest changes from the old microservice architecture to Kubernetes.

Short answer

If your microservices are running inside Kubernetes:

  • βœ… Use OpenFeign for service-to-service communication.
  • βœ… Let Kubernetes Service handle load balancing.
  • ❌ You typically do not need Spring Cloud LoadBalancer.

Before Kubernetes (Traditional Spring Cloud)

Order Service
β”‚
β–Ό
OpenFeign
β”‚
β–Ό
Spring Cloud LoadBalancer (Earlier Ribbon)
β”‚
β–Ό
Eureka Server
β”‚
β–Ό
Instance 1
Instance 2
Instance 3

How it worked:

  1. Feign asked Eureka for all instances.
  2. Eureka returned a list of instances.
  3. Spring Cloud LoadBalancer chose one.
  4. Feign sent the request.

The client decided where to send the request (client-side load balancing).


With Kubernetes

Order Pod
β”‚
β–Ό
OpenFeign
β”‚
β–Ό
customer-service
(Kubernetes Service)
β”‚
β–Ό
kube-proxy / networking
β”‚
β”Œβ”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”
β–Ό β–Ό β–Ό
Pod 1 Pod 2 Pod 3

How it works:

  1. Feign sends the request to http://customer-service.
  2. Kubernetes DNS resolves customer-service to the Service IP.
  3. Kubernetes Service automatically forwards the request to one of the healthy pods.

Feign doesn’t know or care which pod receives the request.


So does Spring Cloud LoadBalancer disappear?

In most Kubernetes deployments:

Yes, practically.

You don’t configure:

  • Eureka
  • Ribbon
  • Spring Cloud LoadBalancer

because Kubernetes already provides service discovery and load balancing.


Example

Your Feign client:

@FeignClient(name = "customer-service")
public interface CustomerClient {

@GetMapping("/customers/{id}")
Customer getCustomer(@PathVariable Long id);

}

Application configuration:

customer-service:
url: http://customer-service

Feign calls:

http://customer-service/customers/1

Kubernetes automatically routes it:

customer-service
β”‚
β–Ό
Pod A

Next request
β–Ό
Pod C

Next request
β–Ό
Pod B

No extra load-balancing code is required.


Why do some projects still include Spring Cloud LoadBalancer?

There are a few reasons:

  • The same application runs both locally and in Kubernetes.
  • The team hasn’t fully migrated from an older Spring Cloud architecture.
  • They use advanced client-side load-balancing features or custom selection policies.

For a Kubernetes-only environment, it’s usually unnecessary.


Modern enterprise architecture

                Kubernetes Cluster
------------------------------------------------

API Gateway
β”‚
β–Ό
Order Service
β”‚
β–Ό
OpenFeign
β”‚
β–Ό
customer-service (K8s Service)
β”‚
β–Ό
Pod 1
Pod 2
Pod 3

------------------------------------------------

Responsibilities

ComponentResponsibility
OpenFeignMakes HTTP calls using a Java interface
Kubernetes DNSFinds the destination service
Kubernetes ServiceLoad balances requests across healthy pods
PodsProcess the request

So, in a modern Kubernetes-based microservice architecture, OpenFeign is still used, but Kubernetes is responsible for service discovery and load balancing, making Spring Cloud LoadBalancer generally unnecessary.