# apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: 'nginx'
    nginx.ingress.kubernetes.io/use-regex: 'true'
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    # UPDATE THIS LINE ABOVE
spec:
  rules:
    - http:
        paths:
          - path: /?(.*)
            pathType: Prefix
            # UPDATE THIS LINE ABOVE
            backend:
              service:
                name: client-cluster-ip-service
                port: 
                  number: 5000
          - path: /api/?(.*)
            # UPDATE THIS LINE ABOVE
            pathType: Prefix
            backend:
              service:
                name: server-cluster-ip-service
                port:
                  number: 3000
          - path: /api/?(.*)
            # UPDATE THIS LINE ABOVE
            pathType: Prefix
            backend:
             service:
                name: qrcode-cluster-ip-service
                port:
                  number: 8080
# rules:
#   - http:
#       paths:
#       - path: /testpath
#         pathType: Prefix
#         backend:
#           service:
#             name: test
#             port:
#               number: 80
