Aggregate Logs with Loki and Grafana
Advanced · 60 minutes · 5 tasks, checked automatically · 100 points
In this advanced observability lab you will build a complete log aggregation stack on a local kind cluster. You will deploy Grafana Loki as the log storage backend, Promtail as the log shipping DaemonSet, and Grafana as the visualisation front-end — all via Helm. You will then deploy a sample workload that emits structured logs, verify that Loki is ingesting those logs, and query them inside Grafana through a port-forwarded session. By the end you will understand how the Promtail → Loki → Grafana pipeline works and how to write LogQL queries to filter and inspect application logs.
What you’ll learn
- Deploy Grafana Loki and Promtail using the official Grafana Helm charts into a dedicated namespace
- Deploy Grafana and wire it to Loki as a pre-configured datasource using a ConfigMap-based provisioning approach
- Run a log-emitting workload and verify end-to-end log ingestion by querying Loki's HTTP API and Grafana's Explore view
How this lab works
- Start the lab: One click starts a real Kubernetes cluster on your computer (kind), with kubectl ready in a toolbox terminal.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads your live cluster and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Cluster: A real Kubernetes cluster on your computer (kind)
- Kubernetes: 1.34.8
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
- A kind cluster created in the Kubernetes Playground
Topics: loki, grafana, promtail, logging, observability, helm, logql, daemonset, kind
Create a free account to start this lab.