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