apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: things2do-ingress
  namespace: things2do
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  ingressClassName: nginx
  rules:
    - host: kubernetes.docker.internal
      http:
        paths:
          - path: /things2do/backend(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                name: things2do-backend
                port:
                  number: 3000
          - path: /things2do/frontend(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                name: things2do-frontend
                port:
                  number: 80
