Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Install Loki with Helm
Prerequisites
Make sure you have Helm installed and deployed to your cluster.
Add Loki’s chart repository to Helm:
helm repo add loki https://grafana.github.io/loki/chartsTo update the chart repository, run:
helm repo updateDeploy Loki to your cluster
Deploy with default config
helm upgrade --install loki loki/loki-stackDeploy in a custom namespace
helm upgrade --install loki --namespace=loki loki/lokiDeploy with custom config
helm upgrade --install loki loki/loki --set "key1=val1,key2=val2,..."Deploy Loki Stack (Loki, Promtail, Grafana, Prometheus)
helm upgrade --install loki loki/loki-stack --set grafana.enabled=true,prometheus.enabled=true,prometheus.alertmanager.persistentVolume.enabled=false,prometheus.server.persistentVolume.enabled=falseDeploy Loki Stack (Loki, Promtail, Grafana, Prometheus) with persistent volume claim
helm upgrade --install loki loki/loki-stack --set grafana.enabled=true,prometheus.enabled=true,prometheus.alertmanager.persistentVolume.enabled=false,prometheus.server.persistentVolume.enabled=false,loki.persistence.enabled=true,loki.persistence.storageClassName=standard,loki.persistence.size=5GiDeploy Loki Stack (Loki, Fluent Bit, Grafana, Prometheus)
helm upgrade --install loki loki/loki-stack \
--set fluent-bit.enabled=true,promtail.enabled=false,grafana.enabled=true,prometheus.enabled=true,prometheus.alertmanager.persistentVolume.enabled=false,prometheus.server.persistentVolume.enabled=falseDeploy Grafana to your cluster
To install Grafana on your cluster with Helm, use the following command:
helm install stable/grafana -n loki-grafanaTo 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 ; echoTo access the Grafana UI, run the following command:
kubectl port-forward --namespace <YOUR-NAMESPACE> service/loki-grafana 3000:80Navigate to http://localhost:3000 and login with admin and the password
output above. Then follow the instructions for adding the Loki Data Source, using the URL
http://loki:3100/ for Loki.
Run Loki behind HTTPS ingress
If Loki and Promtail are deployed on different clusters you can add an Ingress in front of Loki. By adding a certificate you create an HTTPS endpoint. For extra security you can also enable Basic Authentication on the Ingress.
In Promtail, set the following values to communicate using HTTPS and basic authentication:
loki:
serviceScheme: https
user: user
password: passSample Helm template for Ingress:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress.class }}
ingress.kubernetes.io/auth-type: "basic"
ingress.kubernetes.io/auth-secret: {{ .Values.ingress.basic.secret }}
name: loki
spec:
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- backend:
serviceName: loki
servicePort: 3100
tls:
- secretName: {{ .Values.ingress.cert }}
hosts:
- {{ .Values.ingress.host }}


