Kubernetes ALB Ingres doesn't route traffic to any rules except /*

2/14/2019

I deployed a "monolithic" app into kubernetes on AWS. This app works fine through the ALB.

Next I want to deploy a small service at the same cluster and map traffic to it through the same ALB ingress.

Here is how the Ingress manifest looks like:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: scala-backend-ingress
  namespace: prod
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
  labels:
    app: akka-backend
spec:
  rules:
    - http:
        paths:
        - path: /proxy/service/*
            backend:
              serviceName: proxy-service-np
              servicePort: 80
          - path: /*
            backend:
              serviceName: akka-main-np
              servicePort: 80

Unfortunately when I call:

GET www.aliace.example.com/proxy/service/traffic/data

I receive back 502 Bad Gateway response with header Server → awselb/2.0.

All traffic to /* is handled properly.

-- Alex Fruzenshtein
amazon-web-services
kubernetes
kubernetes-ingress

2 Answers

2/14/2019

can you try as below

- path: /proxy/service/*/*
            backend:
              serviceName: proxy-service-np
              servicePort: 80
-- P Ekambaram
Source: StackOverflow

2/14/2019

The problem was not in kubernetes. The application in the container was bounded to localhost instead of 0.0.0.0

-- Alex Fruzenshtein
Source: StackOverflow