---
title: "Sending Kubernetes logs To ClickHouse with Fluent Bit"
description: "Fluent Bit deployed as a Kubernetes DaemonSet via its Helm chart can enrich container logs with Kubernetes metadata and ship them to ClickHouse over the HTTP interface using JSONEachRow inserts."
url: "https://swe.quest/articles/sending-kubernetes-logs-to-clickhouse-with-fluent-bit-84e8996833767c24"
canonical: "https://clickhouse.com/blog/kubernetes-logs-to-clickhouse-fluent-bit"
source: "ClickHouse"
published: "2022-10-28"
difficulty: "medium"
kind: "How-to"
reading_minutes: 8
tags: ["observability","kubernetes","analytics","databases"]
---

# Sending Kubernetes logs To ClickHouse with Fluent Bit

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2022-10-28, 8 min read, How-to. Original: [https://clickhouse.com/blog/kubernetes-logs-to-clickhouse-fluent-bit](https://clickhouse.com/blog/kubernetes-logs-to-clickhouse-fluent-bit)

## Summary

Fluent Bit deployed as a Kubernetes DaemonSet via its Helm chart can enrich container logs with Kubernetes metadata and ship them to ClickHouse over the HTTP interface using JSONEachRow inserts. A nest filter places all fields under a JSON \`log\` column, and a Lua filter lifts \`host\` and \`pod\_name\` to top-level LowCardinality(String) columns so they can serve in the MergeTree primary key alongside timestamp. Recommended practices: use the experimental JSON Object type only for dynamic fields, explicitly type known fields, drop unused fields to avoid column explosion, and tune Fluent Bit's default 1s flush so ClickHouse receives batches of at least ~1000 rows. A sample Grafana dashboard (ID 17284) visualizes the resulting data.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)

## Prerequisites

- Kubernetes and Helm basics ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- ClickHouse MergeTree tables ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- Fluent Bit pipeline configuration ([easy posts on Configuration management](https://swe.quest/tags/configuration.md?difficulty=easy))

## Keywords

ClickHouse, Fluent Bit, Kubernetes, Helm, Grafana, ClickHouse Cloud, Amazon EKS

## Related posts

- [Building an Observability Solution with ClickHouse - Part 1 - Logs](https://swe.quest/articles/building-an-observability-solution-with-clickhouse-part-1-logs-7367c3ac34797550.md): ClickHouse · 2023-01-11 · Medium · 24 min read · Observability, Analytics & OLAP, Kubernetes, SQL
  ClickHouse can serve as the storage backend for Kubernetes log collection using any of three agents: the OpenTelemetry Collector, Vector and Fluent Bit.
- [Sending Nginx logs to ClickHouse with Fluent Bit](https://swe.quest/articles/sending-nginx-logs-to-clickhouse-with-fluent-bit-5d4b04deaca82dc6.md): ClickHouse · 2022-10-21 · Medium · 5 min read · Observability, Analytics & OLAP, Databases
  Fluent Bit can ship Nginx access logs into ClickHouse by tailing the log file with the nginx\_access parser, nesting all parsed fields under a single \`log\` key with the Nest filter, and posting them through the HTTP output plugin as JSONEachRow inserts.
- [Sending Windows Event Logs to ClickHouse with Fluent Bit](https://swe.quest/articles/sending-windows-event-logs-to-clickhouse-with-fluent-bit-a9cd29ea6f2c615f.md): ClickHouse · 2023-01-17 · Medium · 10 min read · Observability, Analytics & OLAP, Threat detection
  Fluent Bit's winevtlog input can collect Windows Event Logs, including the Sysmon/Operational and Security channels, and ship them to ClickHouse over HTTP as JSONEachRow with async\_insert enabled.
- [ClickHouse and OpenTelemetry](https://swe.quest/articles/clickhouse-and-opentelemetry-84cdeb7807e844a6.md): ClickHouse · 2024-11-07 · Medium · 10 min read · Observability, Analytics & OLAP, Databases, Open source
  ClickHouse now officially supports the OpenTelemetry Collector exporter for ClickHouse, which has reached beta for logs and traces.
- [Clever ingests 200x more logs at the same cost with ClickHouse Cloud](https://swe.quest/articles/clever-ingests-200x-more-logs-at-the-same-cost-with-clickhouse-cloud-cafdd48afca59e57.md): ClickHouse · 2026-06-30 · Medium · 8 min read · Observability, Analytics & OLAP, Cost optimization, System design
  Clever replaced a split Datadog/Athena logging setup with ClickHouse Cloud.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
