---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
 name: example-ingress
 namespace: default
 annotations:
  nginx.ingress.kubernetes.io/rewrite-target: /$1
  kubernetes.io/ingress.class: "nginx"
spec:
 rules:
 - host: my-app.com
   http:
     paths:
     - path: /
       pathType: Prefix
       backend:
         service:
           name: myapp-service
           port:
             number: 80
