apiVersion: networking.k8s.io/v1
#apiVersion: extensions/v1beta1 
kind: Ingress
metadata:
  name: ingress-shop
#  namespace: ingress
  annotations:
    # use the shared ingress-nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: shop.com
    http:
      paths:
      - path: /api/products
        pathType: Prefix      
        backend:
#          serviceName: products-service
#          servicePort: 3000
          service:
            name: products-service
            port: 
              number: 3000
      - path: /api/cart
        pathType: Prefix      
        backend:
#          serviceName: cart-service
#          servicePort: 3001
          service:
            name: cart-service
            port: 
              number: 3001
