How can I configure URL prefix based routing using AIGC in an AKS cluster?

王 天青 0 Reputation points
2023-11-28T10:42:25.44+00:00

I'm using AIGC in my AKS cluster and have read the documentation, but I'm unsure which annotation to use for my specific requirement: I need URL prefixes like `

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.
1,790 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 10,731 Reputation points MVP
    2023-11-30T21:57:38.3433333+00:00

    Hello @王 天青

    You need to route requests based on URL prefixes like <prefix>.mycloud.com to the corresponding /prefix service. You need to use host-based routing with path-based rules.

    In your AKS cluster create an Ingress that specifies the routing rules.

    In the Ingress, use specific annotations to inform AGIC how to configure the Application Gateway.

    Here is configuration for Ingress:

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: prefix-routing
      annotations:
        kubernetes.io/ingress.class: azure/application-gateway
    spec:
      rules:
      - host: "prefix.mycloud.com"
        http:
          paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: prefix-service
                port:
                  number: 80
    
    

    https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/setup/install-new.md

    0 comments No comments