ALB ingress mixed private and internet facing paths

11/9/2020

I have a set of containerized microservices behind an ALB serving as endpoints for my API. The ALB ingress is internet-facing and I have set up my path routing accordingly. Suddenly the need appeared for some additional (new) containerized microservices to be private (aka not accessible through the internet) but still be reachable from, and able to communicate with, the ones that are public (internally).

Is there a way to configure path based routing , or modify the ingress with some annotation to keep certain paths private?

If not, would a second ingress (an internal one this time) under the same ALB do the trick for what I want?

Thanks, George

-- George S.
amazon-web-services
aws-alb
aws-application-load-balancer
kubernetes
kubernetes-ingress

1 Answer

11/10/2020

Turns out that (at least for my case) the solution is to ignore the internet-facing Ingress and let it do its thing. Internal facing REST API paths that should not be otherwise accessible can be used through their pods' Service specification.

Implementing a Service per microservice will allow internal access in their <ClusterIP>:<port> without the need to modify anything in the initial Ingress which will continue to handle internet-facing API(s).

-- George S.
Source: StackOverflow