apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myapp-ingress
  namespace: default
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
  # - host: localhost
    - http:
        paths:
        - path: "/api/(.*)"
          pathType: Prefix
          backend:
            service:
              name: mybackendlb-clusterip
              port: 
                number: 4000
        - path: "/(.*)"
          pathType: Prefix
          backend:
            service:
              name: myfrontend-clusterip
              port: 
                number: 3000
