apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  ingressClassName: nginx
  rules:
  - host: marcel.test
    http:
      paths:
      - path: /hello(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: example-service
            port:
              number: 80