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: 'ticketing.dev'
          http:
              paths:
                  - path: /api/orders/?(.*)
                    pathType: Prefix
                    backend:
                        service:
                            name: orders-srv
                            port:
                                number: 3000
                  - path: /api/payments/?(.*)
                    pathType: Prefix
                    backend:
                        service:
                            name: payments-srv
                            port:
                                number: 3000
                  - path: /api/tickets/?(.*)
                    pathType: Prefix
                    backend:
                        service:
                            name: tickets-srv
                            port:
                                number: 3000
                  - path: /api/users/?(.*)
                    pathType: Prefix
                    backend:
                        service:
                            name: auth-srv
                            port:
                                number: 3000
                  - path: /?(.*)
                    pathType: Prefix
                    backend:
                        service:
                            name: client-srv
                            port:
                                number: 3000
# fix:  kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
