This repo shows how I’d deploy a monitoring stack on Kubernetes using Helm and simple YAML manifests.
Two ways to deploy:
single-cluster-setup/— simple one-cluster install with Helm values in this folder.**base/+overlays/— Kustomize + Helm for multi-env (e.g., dev/prod/staging).
Alloy UI
Make sure the following are ready before running the commands:
- Docker Desktop (Kubernetes cluster enabled)
- Helm installed (
brew install helmon MacOS) - kustomize installed(
brew install kustomizeon MacOS) - kubectl configured and pointing to your local cluster
You can check with:
kubectl get nodes
helm version
kustomize --helpYou can use the included Makefile for quick setup.
cd single-cluster-setup/make create-namespace
make apply ENV=<ENV_NAME> #e.g ENV=devKustomize build uses Helm charts under the hood, so make apply runs:
kustomize build overlays/$ENV --enable-helm --load-restrictor=LoadRestrictionsNone | kubectl apply -f -
make statusmake deletemake pf- Then open Alloy UI at http://localhost:12345
# dev
kustomize build overlays/dev | kubectl apply -f -
kubectl -n monitoring rollout status deploy/alloy
kubectl -n monitoring get pods,svc,endpoints -l app.kubernetes.io/name=alloy -o wide
# port-forward Alloy UI
kubectl -n monitoring port-forward deploy/alloy 12345:12345
# open http://127.0.0.1:12345
# check active config and logs
kubectl -n monitoring exec deploy/alloy -c alloy -- sh -c 'sed -n "1,220p" /etc/alloy/config.alloy'
kubectl -n monitoring logs deploy/alloy -c alloy --tail=200- Alloy as a Deployment (1 replica) with:
- Kubernetes discovery (pods/endpoints/…)
- Metrics scrape for annotated targets
- prometheus.relabel to add cluster, environment, region
- prometheus.remote_write → Mimir
- loki.source.kubernetes via K8s API → Loki
- HTTP UI on :12345