Timeout error when curl the service in AKS via public IP and port bounded in ingress rule

Derek Jin 20 Reputation points
2023-02-10T08:10:30.06+00:00
  1. Setup AKS use the default and common setting
  2. Create a simple WSGI server and deploy in AKS
  3. Apply a public IP and deploy a load balancer using public IP for accessing the WSGI server (ref link: https://learn.microsoft.com/en-US/azure/aks/static-ip)
  4. Use curl to test the connection of AKS (ref link: https://learn.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/intermittent-timeouts-or-server-issue) User's image The IP and port I used is public IP and external port of ingress in AKS
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
{count} votes

Accepted answer
  1. Andrei Barbu 2,596 Reputation points Microsoft Employee
    2023-02-10T08:40:43.44+00:00

    Hello Derek!

    Maybe you have a custom NSG and an AKS-managed NSG applied to your resources. For example, one NSG assigned at NIC level and the other at subnet level, or vice-versa. The AKS-managed NSG will get the rules automatically create to allow the connectivity to the public IP used to expose your Kubernetes Service Load Balancer type, but the custom one needs to get the rules added by you.

    You can go to the VMSS in infrastructure resource group, then click on Networking and see there if one or two NSGs are applied. Feel free to share a screenshot if you are not sure how to read the information there.

    If you have two NSGs, then most probably you need to configure the custom one to allow the exposure of the public IP used to expose your Kubernetes Service Load Balancer type.

    You can refer to this link for how to tackle that.

    If that is not the case, just to isolate the issue, please expose another application via a Kubernetes Service Load Balancer type by using the next steps:

    kubectl create deploy nginx --image nginx

    kubectl expose deploy nginx --port 80 --type LoadBalancer

    kubectl get svc #Wait for the public IP of "nginx" service to be assigned and see if for the nginx application works

    If it works for nginx, then the WSGI server may not be functional.


    I hope this is helpful. If any clarification needed, let me know and I will do my best to answer.

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

    Thank you!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.