<p>I deployed Grafana using Helm with the following content (showing only relevant parts) in configuration file:</p>

<pre><code>ingress:
  enabled: true
  annotations:
    ingress.kubernetes.io/rewrite-target: /grafana
    kubernetes.io/ingress.class: nginx-internal
</code></pre>

<p>Then I deployed an Nginx-Ingress using Helm with following config:</p>

<pre><code>controller:
  config:
    ssl-redirect: "false"
  ingressClass: nginx-internal

  service:
    type: NodePort
    nodePorts:
      http: 30080
      https: 30443
</code></pre>

<p>Here is the description of Ingress:</p>

<pre><code>Name:             mottled-magpie-grafana
Namespace:        kube-system
Address:
Default backend:  default-http-backend:80 (&lt;none&gt;)
Rules:
  Host                 Path  Backends
  ----                 ----  --------
  chart-example.local
                       /   mottled-magpie-grafana:80 (10.32.0.93:3000)
Annotations:
  ingress.kubernetes.io/rewrite-target:  /grafana
  kubernetes.io/ingress.class:           nginx-internal
Events:
  Type    Reason  Age   From                      Message
  ----    ------  ----  ----                      -------
  Normal  CREATE  1h    nginx-ingress-controller  Ingress kube-system/mottled-magpie-grafana
  Normal  CREATE  1h    nginx-ingress-controller  Ingress kube-system/mottled-magpie-grafana
  Normal  CREATE  1h    nginx-ingress-controller  Ingress kube-system/mottled-magpie-grafana
  Normal  UPDATE  1h    nginx-ingress-controller  Ingress kube-system/mottled-magpie-grafana
  Normal  CREATE  53m   nginx-ingress-controller  Ingress kube-system/mottled-magpie-grafana
</code></pre>

<p>It all installed fine, but I am unable to access Grafana from my host when I try <code>curl &lt;hostIp&gt;:30080/grafana</code>.</p>

<p>However, this works:</p>

<pre><code>curl &lt;hostIp&gt;:30080 -H "HOST: chart-example.local"
</code></pre>

<p>The setup is running on a local VM. How do I access Grafana from my browser (without manually adding the <code>Host</code> header)?</p>

Jaskaranbir Singh
<p>Your ingress is set up for only one host - chart-example.local, which comes from that Helm chart's Values.yaml. If you are running no other ingresses, replace chart-example.local in Values.yaml with "*", this will match any Host. If you have other ingresses, this could steal their traffic, so make it "localhost" or "127.0.0.1" and you'll be able to connect to either of those two.</p>

<p>What I like to do is create a fake host name, like foo.local, and add that to /etc/hosts so that it's a valid hostname.</p>
