question

SusheelBhatt-3343 avatar image
0 Votes"
SusheelBhatt-3343 asked srbose-msft edited

Azure application gateway ingress controller path based routing not working

We are using Azure Kubernetes Service to host our application where we have two pods acting as backend. And one pod acting as frontend.

Frontend and backend pods are using Nginx internally for path based routing.

So the workflow is AGIC sends request to Nginx(behind the load balancer AKS service) and these pods are behind this load balancer.

We are using path based routing to route our traffic to these pods, which work for two pods but one of the pod in backend isn't working.

Where as I can access it using load balancer IP which confirms the pod is responding to the requests.

Thanks.

azure-kubernetes-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

srbose-msft avatar image
0 Votes"
srbose-msft answered srbose-msft edited

@SusheelBhatt-3343 , Thank you for your question.

If you are:

using path based routing to route our traffic to these pods, which work for two pods but one of the pod in backend isn't working.

Please check that the spec.rules[].http.paths[].path, that you are mentioning in the Ingress resource, is a path that your backend nginx servers are configured to handle. One thing you might definitely want to check if the wildcards (if in use) in the spec.rules[].http.paths[].path are set up correctly

Also you might want to check the Application Gateway Resource health as follows:

  • Navigate to the Application Gateway resource in the Azure Portal.

  • Go to the Resource Health section from the left hand menu

    136727-image.png

  • Go to the resource health dashboard to check if the Application Gateway instance is healthy

    136783-image.png

You can also check out the following:

Hope this helps.

Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.


image.png (95.3 KiB)
image.png (34.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.