In AWS EKS Ingress Application Load Balancer Controller configuration, is it possible to use host-based routing with multiple apps to a single ALB?

0

In AWS EKS Ingress Application Load Balancer Controller configuration, is it possible to use host-based routing with multiple apps to a single ALB?

So far, all examples I've seen online use path-based routing in order to use single ALB. Example.

dev.mydomain.com/app1
				               ----> dev ALB
dev.mydomain.com/app2

When using a simple nginx/index.html page, I'm able to successfully configure using path-based routing as above.

However, the path-routing configuration is problematic with our main NodeJS web application, which includes its own internal Express server.js with many path routes configured as well. Example:

dev.mydomain.com/authentication/sign-in

The problem appears to be due to both the ALB and the internal Express attempting to use unique path-routing, creating a conflict. When attempting to use dev.mydomain.com/app1, I get a simple Error 404-page not found.

If there's something I'm missing here, please let me know.

One way to solve this issue could be to use host-based routing to a single ALB instead. Example:

app1-dev.mydomain.com
				                ----> dev ALB
app2-dev.mydomain.com

ChatGPT said it could be configured by deploying the ALB from the Deployment manifest (instead from the Ingress manifest). Is this accurate? I haven't been able to find any other examples online yet.

Thanks in advance.

1回答
0

Hi,

Yes, it's possible. The key point is to use alb.ingress.kubernetes.io/group.name: you-alb-name to tell the Load Balancer Controller that all of them are on the same ALB. Please use this page as a starting point: https://aws.amazon.com/blogs/containers/serve-distinct-domains-with-tls-powered-by-acm-on-amazon-eks/

profile picture
エキスパート
回答済み 3ヶ月前
  • Thanks for the link. I'll follow the template manifest file and merge the changes into our manifest files and give it try. Thanks again!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ