0
votes

Hi I am looking for a way to create multisite listener type and provide hostnames of the sites when Application gateway is created by Application gateway ingress controller.

By default, AGIC creates listeners of type basic, which is not working correctly when more than one ingress with different hostnames are deployed in a AKS cluster.

Can anybody suggest required annotations to achieve it?

1

1 Answers

0
votes

Just ran a quick green field deployment and it's working fine. AGIC is creating multiple basic listeners on port 80 and serving traffic to multiple hosts even though the portal interface is showing errors. Please make sure you creating the Ingress and other k8s objects properly.

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: name-virtual-host-ingress
  annotations:
    kubernetes.io/ingress.class: azure/application-gateway
spec:
  rules:
  - host: foo.bar.com
    http:
      paths:
      - path: /
        backend:
          serviceName: aspnetapp
          servicePort: 80
  - host: bar.foo.com
    http:
      paths:
      - path: /
        backend:
          serviceName: nginx
          servicePort: 80