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