apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx-thing
  annotations:
   nginx.ingress.kubernetes.io/rewrite-target: /$2
  labels:
    app: nginx-thing
spec:
  ingressClassName: nginx
  rules:
    - http:
       paths:
         - pathType: Prefix
           path: /nginx-thing(/|$)(.*)
           backend:
             service:
               name: nginx-thing
               port:
                 number: 8080
