loki-stack
by sarwank
Loki: like Prometheus, but for logs.
About this chart
Loki-Stack Helm Chart
Prerequisites
Make sure you have Helm installed installed.
Get Repo Info
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
See helm repo for command documentation.
Deploy Loki and Promtail to your cluster
Deploy with default config
helm upgrade --install loki grafana/loki-stack
Deploy in a custom namespace
helm upgrade --install loki --namespace=loki-stack grafana/loki-stack
Deploy with custom config
helm upgrade --install loki grafana/loki-stack --set "key1=val1,key2=val2,..."
Deploy Loki and Fluent Bit to your cluster
helm upgrade --install loki grafana/loki-stack \
--set fluent-bit.enabled=true,promtail.enabled=false
Deploy Grafana to your cluster
The chart loki-stack contains a pre-configured Grafana, simply use --set grafana.enabled=true
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/.
Deploy loki-stack with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has loki-stack on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartloki-stack is pinned at v2.6.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply