apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
  rules:
    - host: localhost
      http:
        paths:
          - path: /api/users/?(.*)
            pathType: Prefix
            backend:
              service:
                name: auth-service
                port:
                  number: 3001
          - path: /api/junk/?(.*)
            pathType: Prefix
            backend:
              service:
                name: junk-service
                port:
                  number: 3001
          - path: /api/orders/?(.*)
            pathType: Prefix
            backend:
              service:
                name: orders-service
                port:
                  number: 3001
          - path: /api/payments/?(.*)
            pathType: Prefix
            backend:
              service:
                name: payments-service
                port:
                  number: 3001
          - path: /?(.*)
            pathType: Prefix
            backend:
              service:
                name: client-service
                port:
                  number: 3000
