0
votes

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.

2

2 Answers

0
votes

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 the Application 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 :

enter image description here

0
votes

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