P.Das
P.Das

Reputation: 53

Load Balancing between PODS

Is there a way to do active and passive load balancing between 2 PODs of a micro-service. Say I have 2 instance(PODs) running of Micro-service, which is exposed using a K8s service object. Is there a way to configure the load balancing such a way that one pod will always get the request and when that pod is down , the other pod will start receiving the request?

I have ingress object also on top of that service.

Upvotes: 1

Views: 634

Answers (1)

coderanger
coderanger

Reputation: 54267

This is what the Kubernetes Service object does, which you already mentioned you are using. Make sure you set up a readiness probe in your pod template so that the system can tell when your app is healthy.

Upvotes: 3

Related Questions