Kubernetes load balancing between 2 services

3/17/2020

I have deployed my microservices as 2 separate service - ServiceA & ServiceB, with a pod within each service. I want a load balancer that can route the traffic to either ServiceA or ServiceB. Its kind of an alternate backend, we have similar options in Openshift using routes but can we do it in AWS ingress controller and specify alternate backend services.

In openshift we can use the below route configuration

spec:
  alternateBackends:
    - kind: Service
      name: ServiceB
      weight: 25
  host: lb.apps.xyz.com
  port:
    targetPort: https
  tls:
    termination: passthrough
  to:
    kind: Service
    name: ServiceA
    weight: 75
  wildcardPolicy: None
-- sam
kubernetes
kubernetes-ingress

0 Answers