apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  creationTimestamp: null
  name: demo-ingress2
spec:
  ingressClassName: nginx
  rules:
  - host: www.wang.org
    http:
      paths:
      - backend:
          service:
            name: pod-test1
            port:
              number: 80
        path: /v1(/|$)(.*)
        #pathType: Exact      #默认类型为Exact        
        pathType: ImplementationSpecific #修改为类型,不支持Prefix
      - backend:
          service:
            name: pod-test2
            port:
              number: 80
        path: /v2(/|$)(.*)
        #pathType: Exact      #默认类型为Exact        
        pathType: ImplementationSpecific #修改为类型,不支持Prefix
