apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: auto-services
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
  - host: auto-apis.com
    http:
      paths:
      - path: /sales(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: srv-sales
            port:
              number: 80
      - path: /inspections(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: srv-inspections
            port:
              number: 80
