working on an nginx ingress project that I am passing to Azure Application Gateway Ingress Controller, I came across this issue of passing this notation from the Paths to the Application Gateway ingress controller. here the nginx file
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-trackingservice
namespace: trackingserviceespaceuat
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /trackingserviceapi(/|$)(.*)
pathType: Prefix
backend:
service:
name: trackingservice
port:
number: 80
then I want to pass this notation to ingress controller Application Gateway
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-trackingservice
namespace: trackingserviceespace
annotations:
kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/backend-path-prefix: "/"
spec:
tls:
- hosts:
- essoftware.online
secretName: tlscertn
rules:
- host: essoftware.online
http:
paths:
- path: /trackingserviceapi(/|$)(.*)
pathType: Prefix
backend:
service:
name: trackingservice
port:
number: 80
then I realized two important things about nginx
nginx.ingress.kubernetes.io/rewrite-target: /$2
- path: /trackingserviceapi(/|$)(.*)
How can I migrate this to Azure Application Gateway? Because of course the load balancer works for me but this doesn’t.