apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
  ingressClassName: nginx
  rules:
    - host: zerviez.io
      http:
        paths:
          - path: /?(.*)
            pathType: Prefix
            backend:
              service:
                name: web-zerviez-cluster-ip-service
                port:
                  number: 3000
          - path: /api/?(.*)
            pathType: Prefix
            backend:
              service:
                name: zerviez-cluster-ip-service
                port:
                  number: 8080
