<p>I am following the following <a href="https://grafana.com/docs/loki/latest/installation/microservices-helm/" rel="nofollow noreferrer">grafana</a> documentation on loki. I am unable to properly connect to my k8s clusters loki logs after installing loki, promtail, and grafana via helm charts. When I enter the http: url in Add datasources within the Grafana GUI and proceed to save &amp; test, grafana is unable to connect to loki.</p>
<p>My helm commands are:</p>
<pre><code>helm upgrade --install --namespace=monitoring promtail grafana/promtail --set &quot;loki.serviceName=loki&quot;
helm upgrade --install loki --namespace=monitoring grafana/loki-distributed
helm install --namespace=monitoring loki-grafana grafana/grafana
</code></pre>
<p>Now I mainly am having trouble with this step and the syntax and how to debug the process:
&quot;using the URL <a href="http://helm-installation-name-gateway.namespace.svc.cluster.local/" rel="nofollow noreferrer">http://helm-installation-name-gateway.namespace.svc.cluster.local/</a> for Loki (with  and  replaced by the installation and namespace, respectively, of your deployment).&quot;</p>
<p>I have tried all of the following URLs with no luck, any guidance would be very appreciated!</p>
<pre><code>http://loki-grafana.monitoring.svc.cluster.local:3100
</code></pre>
<blockquote>
<p>Unable to fetch labels from Loki (Failed to call resource), please check the server logs for more details</p>
</blockquote>

Matt - Block-Farms.io
<p>I figured it out.</p>
<pre><code>helm repo add loki https://grafana.github.io/loki/charts
helm repo update
kubectl create namespace monitoring
helm upgrade --install loki --namespace=monitoring grafana/loki-stack
helm upgrade --install grafana --namespace monitoring grafana/grafana
kubectl get secret --namespace monitoring grafana -o jsonpath=&quot;{.data.admin-password}&quot; | base64 --decode ; echo
kubectl port-forward --namespace loki service/grafana 3000:80
</code></pre>
<p>Then when you log into grafana use http://loki:3100 for the datasource url</p>
<p>The guide I found is here: <a href="https://medium.com/codex/setup-grafana-loki-on-local-k8s-cluster-minikube-90450e9896a8" rel="nofollow noreferrer">https://medium.com/codex/setup-grafana-loki-on-local-k8s-cluster-minikube-90450e9896a8</a></p>
<p>I just skipped the minikube and ingress stuff</p>
