URL based routing using Application Gateway Ingress Controller in AKS cluster

Saravanan Krishnan 40 Reputation points
2023-09-04T06:44:45.63+00:00

Hello,

I am trying to expose the application from the AKS cluster to the internet using the Application Gateway Ingress controller. The URL below I followed is only to expose the application via public IP. I don't find any document and method to export application via hostname with path prefix using AGIC. Could anyone help me on this.
https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-ingress-controller-add-on-new

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,069 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,116 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AirGordon 7,125 Reputation points
    2023-09-04T07:01:29.69+00:00

    The dedicated Agic docs are the best source of examples

    https://azure.github.io/application-gateway-kubernetes-ingress/annotations/

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: go-server-ingress-overridefrontendport
      namespace: test-ag
      annotations:
        kubernetes.io/ingress.class: azure/application-gateway
        appgw.ingress.kubernetes.io/override-frontend-port: "8080"
    spec:
      rules:
      - http:
          paths:
          - path: /hello/
            backend:
              service:
                name: store-service
                port:
                  number: 80
            pathType: Exact
    

    There is a sample of a complex use of AppGateway Ingress using hostname here;

    https://github.com/Azure-Samples/java-aks-keyvault-tls/blob/main/helm/openjdk-demo/templates/ingress.yaml

    The repo itself focuses on showing end to end tls, which might also be useful to you,

    0 comments No comments

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.