0

I create a brand new AKS without customization.

I apply this simple ingress example : https://learn.microsoft.com/en-us/azure/aks/ingress-basic?tabs=azure-cli

  • path: /(.*) pathType: Prefix backend: service: name: aks-helloworld-one port: number: 80

This snippet is contained in the example. When I remove it all other paths break as well.

Why is that?

kavyaS
  • 8,026
  • 1
  • 7
  • 19
Johannes
  • 6,490
  • 10
  • 59
  • 108

1 Answers1

0

In a huge twist it turns out that the ms implementation configures the load balancer with a /healthz check that originates from the load balancer. So In order to keep the load balancer traffic coming you need to have an ingress route to /healthz that returns a 200. Coincidentally that was caught by the catch all route thus fulfilling the /healthz requirement of the azure load balancer.

I assume this is something that is set in the helm chart of the default installation used in that microsoft example.

By removing the demo app from the cluster you are also removing the response to /healthz and the load balancer will no longer forward traffic to your ingress.

Johannes
  • 6,490
  • 10
  • 59
  • 108
  • How did you fix this? I applied the annotation --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz. Still i'm not able to route if catch all path is removed – PNDev Jun 07 '23 at 14:29
  • There are two ways - use the instructions from nginx and not the ms instructions. The other way is to set up an application that response to the /healthz cann with a prosper response. – Johannes Jun 20 '23 at 11:13