Make sure you have Helm installed and deployed to your cluster. Then add Loki’s chart repository to Helm:
$ helm repo add loki https://grafana.github.io/loki/charts
$ helm upgrade --install loki loki/loki-stack
$ helm upgrade --install loki loki/loki --set "loki.serviceName=my-loki"
$ helm upgrade --install promtail loki/promtail
To install Grafana on your cluster with helm, use the following command:
$ helm install stable/grafana -n loki-grafana
To get the admin password for the Grafana pod, run the following command:
$ kubectl get secret --namespace <YOUR-NAMESPACE> loki-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
To access the Grafana UI, run the following command:
$ kubectl port-forward --namespace <YOUR-NAMESPACE> service/loki-grafana 3000:80
Navigate to http://localhost:3000 and login with admin
and the password output above.
Then follow the instructions for adding the loki datasource, using the URL http://loki:3100/
.