<p>I run a bare-metal Kubernetes cluster and want to map services onto URLs instead of ports (I used <code>NodePort</code> so far).</p>
<p>To achieve this I tried to install an <code>IngressController</code> to be able to deploy Ingress objects containing routing.</p>
<p>I installed the <code>IngressController</code> via helm:</p>
<pre><code>helm install my-ingress helm install my-ingress stable/nginx-ingress
</code></pre>
<p>and the deployment worked fine so far. To just use the node's domain name, I enabled <code>hostNetwork: true</code> in the <code>nginx-ingress-controller</code>.</p>
<p>Then, I created an Ingress deployment with this definition:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /testpath
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 80
</code></pre>
<p>which also deployed fine. Finally, when I try to access <code>http://my-url.com/testpath</code> I get a login-prompt. I nowhere set up login-credentials nor do I intend to do so as the services should be publicly available and/or handle authentication on their own.</p>
<p>How do I disable this behavior? I want to access the services just as I would use a <code>NodePort</code> solution.</p>

Herry
<p>To clarify the case I am posting answer (from comments area) as Community Wiki.</p>
<p>The problem here was not in configuration but in environment - there was running another ingress in the pod during Longhorn' deployment. This situation led to force basic authentication to both ones.</p>
<p>To resolve that problem it was necessary to to clean up all deployments.</p>
