aws-load-balancer-controller: paths not working

Hi I have setup ingress-controller on AWS EKS, but I am having problems resolving paths other then the base /

In the example below / does work correctly however /api does not work.

I am using the same app in this example but I have tested it with other apps running in my cluster aswell, all which dont work on /somethinghere.

Any idea what might be going wrong ?

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: "webapp-alb-ingress"
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/subnets: subnet-01e193631sfedsf0a3,subnet-0b0064f88sdffd075,subnet-0252d90sdffdfb77e
    alb.ingress.kubernetes.io/tags: Environment=prod,Team=locali
    ingress.kubernetes.io/rewrite-target: /
  labels:
    app: webapp-service
spec:
  backend:
    serviceName: default-http-backend
    servicePort: 80
  rules:
  - http:
      paths: 
        - backend:
            serviceName: localiapi
            servicePort: 4040
          path: /api
        - backend:
            serviceName: localiapi
            servicePort: 4040
          path: /

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (4 by maintainers)

Most upvoted comments

I had the same problem, solution is to use path: /*. Because the rule for the ALB is referencing this value directly, e.g.:

screenshot 2018-10-29 at 14 26 31

So if the rule says “Path is /”, then all your requests (other than for /) return a 404 (fallback rule).

Hi,

have the same problem, It would be nice if we had a rewrite target rule for the alb like it’s possible with the nginx ingress controller.

BR

It still happens 😦 Anyone?

Aws works only with /* for subpaths

NP, definitely not what most people expect and it would be nice if we could provide a rewrite rule in the ALB. You may also want to change your rule to use /api* and ditch the /* rule.