'In a kind cluster why does Nginx Ingress not work with grafana redirect

I have a kind kubernetes cluster and have installed the nginx ingress as described on the website. The following is my ingress configuration. Navigating to /hello works succesfully, however navigating to /grafana returns a 302 to /login. When the browser follows the redirect it gets a 404. How do I configure the ingress so that redirects work?

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /grafana
        pathType: Prefix
        backend:
          service:
            name: grafana
            port:
              number: 3000
      - path: /hello
        pathType: Prefix
        backend:
          service:
            name: hello
            port:
              number: 4000


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source