Ingress root path not redirected to HTTPS despite `ssl-redirect=true`

  • Setup: Azure AKS with application gateway ingress, annotated with ssl-redirect=true
  • Problem: Root path doesn’t get redirected to HTTPS.

Here’s my ingress.yml:

apiVersion: extensions/v1beta1 kind: Ingress metadata:   name: my-ingress   annotations: azure/application-gateway "/$  1" "true" spec:   tls:     - hosts:       -       secretName: my   rules:   - host:     http:       paths:       - path: /(.*)         backend:           serviceName: my-gui-svc           servicePort: 80       - path: /svc1/(.*)         backend:           serviceName: my-svc1-svc           servicePort: 80       - path: /svc2/(.*)         backend:           serviceName: my-svc2-svc           servicePort: 80 

Here’s the resonse from curl on one of the non-root routes:

C:\>curl <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>Microsoft-Azure-Application-Gateway/v2</center> </body> </html> 

And here it is for the root rule:

C:\>curl <!doctype html> <html lang="en">  <head>     <meta charset="utf-8"> ... 

I also tried playing with the order in which the rules are listed, putting the root path at the end for example, but it didn’t make a difference.

Also, when I examine the rules in the Azure portal, this is what I see:

enter image description here

(name/site strings in the picture have been modified for security)

What am I doing wrong?