What's the Best Way to Centralize Logs in a Self-Managed K3s Cluster?
Asked by
CloudySamurai42
I'm running a small application on my self-managed Hetzner K3s cluster and want to centralize all the application logs. Typically, all logs are outputted to stdout within the container, but I need a way to persist them when the pods get recreated. Since privacy is a concern, everything needs to stay within the cluster or be self-hostable. Is there a simple and effective solution for this? I've heard Grafana Loki is quite popular, but I'm unsure what to use for shipping the logsโshould I go with Fluentbit, Fluentd, Promtail, or something else?
Answers
Definitely go for Loki + Grafana Alloy! Promtailโs getting replaced by Alloy because itโs an all-in-one agent for logs, metrics, and traces. Plus, the k8s-monitoring-chart uses Alloy operator, which makes it easier to gather everything.
Reply to this answer
If youโre considering the Grafana stack, check out Grafana Alloy. Itโs a solid option that combines many features you'd typically use several tools for.
Reply to this answer
Have you thought about using Vector.dev for your log shipping? It pairs nicely with VictoriaLogs as the engine, and it requires a lot less resources than Grafana Loki. Plus, you can visualize everything with Grafana, keeping it simple and low overhead.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions