简体   繁体   中英

Kubernetes - AKS : Linking AKS cluster with application gateway. Multiple sites (not sub page) point to same IP

Background: We were using Docker swarm with multiple nginx, nodejs/auth, web app service and this stack was linked to application gateway. Multiple tenants/customers were mapped to app gateway IP and internally based on the customer ID, we were showing required pages (NO custom redirects in nginx). Customer urls were like customer1.mycompany.com, customer2.mycompany.com, and more....

Now, we are trying to move everything to Kubernetes (to be précised AKS).

So AKS cluster consist of multiple nginx, nodejs/auth, web app pods. Tried to add app gateway in same resource group with all subnet/networking settings.

But now when user hits the URL, requests are not going to nginx. So found have to use ingress controller.

Did setup ingress controller but another road block. Nginx started throwing DNS error and all (Nginx conf has nodejs/auth service name). For testing purpose, changed name to IP and luckily redirection worked but now this redirect is going into circular loop.

Any thoughts for fixing circular loop issues and have AKS connect to application gateway in simpler manner.

The circular loop issues can be cause by a couple of things and it depends on how your Nginx is configured, but if you want to avoid having an ingress controller, take a look at theApplication Gateway Ingress Controller (AGIC) project. It use a Kubernetes controller to manage the Application Gateway and it will automatically update the Gateway rules when you are creating a new Ingress resource:

在此处输入图像描述

Finally fixed it by using Brownfield / Greenfield (depends on scenario) deployment approach.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM