apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: guestbook-ingress
#  annotations:
#    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: guestbook.info
      http:
        paths:
          - path: /metrics
            pathType: Prefix
            backend:
              service:
                name: guestbook-backend
                port:
                  number: 3000
          - path: /api
            pathType: Prefix
            backend:
              service:
                name: guestbook-backend
                port:
                  number: 3000
          - path: /
            pathType: Prefix
            backend:
              service:
                name: guestbook-ui
                port:
                  number: 5000
