gaurav sharma
gaurav sharma

Reputation: 133

Path Based routing using ALB ingress controller

I am using ALB ingress controller for my 10 microservices.

But Path based routing is not working . Everytime ingress is creating a new load balancer for each service.

My requirement is to have a single load balancer and then use path based routing to browse to different services.

Please let me know what annotations I am missing and how to achieve this?

Example ingress is attached here which I'm currently using:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: abcd
  namespace: "default"
  annotations:
     kubernetes.io/ingress.class: "alb"
     alb.ingress.kubernetes.io/certificate-arn: arn:aws:acmxxxxx
     alb.ingress.kubernetes.io/listen-ports:
     alb.ingress.kubernetes.io/scheme: internal
     alb.ingress.kubernetes.io/subnets: subnet-1,subnet-2
     alb.ingress.kubernetes.io/security-groups: sg-1
spec:
  rules:
    - host:    abcd.com
      http:
        paths:
          - path: /def
            backend:
              serviceName: abcd
              servicePort: 80

Upvotes: 1

Views: 4656

Answers (1)

Tom Lee
Tom Lee

Reputation: 71

According to https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/298 it is not likely to be feasible

the only workable solution is ingress merge

there is sample code in aws blog

I haved use them and it works, through sometimes ingress-merge created additional alb, but you could delete it manually.

Upvotes: 2

Related Questions