apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
     name: myingress
     annotations:
          nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
   rules:
       - host: www.for.com
         http:
             paths:
                - path: /search
                  pathType: Prefix
                  backend:
                      service:
                         name: searchdepo
                         port:
                            number: 80

       - host: www.king.com
         http:
             paths:
                - path: /mail
                  pathType: Prefix
                  backend:
                      service:
                         name: maildepo
                         port:
                            number: 80

       