--- name: k8s-fluent-bit-troubleshooting description: >- Use when Fluent Bit on Kubernetes does not deliver logs: the DaemonSet crashes on a config error ("tried to instance a plugin name that doesn't exist", "unknown configuration property", "configuration file contains errors"), an output fails ("failed to flush chunk", "cannot be retried", "no upstream connections available", "getaddrinfo", "Connection refused"), records arrive without Kubernetes metadata ("could not get meta for POD"), lines arrive unparsed or not at all (tail path, parser, CRI versus Docker format), or inputs pause ("paused (mem buf overlimit"). Covers the Helm chart and the Fluent Operator. Investigates with kubectl get, logs and Fluent Bit's read-only HTTP endpoints, and proposes fixes. Reads first and asks before changing anything. license: Apache-2.0 metadata: verified-with: "kubernetes 1.37, fluent-bit 5.1" verified-on: "2026-10-25" --- # Fluent Bit troubleshooting Find out why Fluent Bit does not ship logs, and propose a fix. **Read first, ask before changing.** Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user. Fluent Bit runs as a DaemonSet: on every node a **tail** input reads the container log files under `/var/log/containers/`, the **kubernetes** filter adds pod metadata from the API server, and **outputs** send the records to a backend (Elasticsearch, Loki, an HTTP endpoint, a forwarder). Its own log names each part as `[input:tail:tail.0]`, `[filter:kubernetes:kubernetes.0]`, `[output:http:http.0]`, so the log usually names the cause. The Helm chart keeps the config in a ConfigMap (`fluent-bit.conf`); the **Fluent Operator** builds it from custom resources into a Secret. The commands use placeholders: `my-namespace`, `my-fluent-bit` (the DaemonSet, its ConfigMap and its ServiceAccount), `my-fluent-bit-pod` (one of its pods) and `my-backend` (the Service an output sends to). Replace them with the real names. Never read Secrets: not the Fluent Operator's rendered config, not Secrets that outputs take credentials from. The ConfigMap may hold credentials inline (`HTTP_Passwd`, `http_api_key`, `cloud_auth`, `bearer_token`, AWS keys): read it, but never repeat those values. Avoid `kubectl describe pod` on Fluent Bit: it prints literal environment values. Never request `/api/v1/trace/...` (a GET turns tracing on) and never POST to `/api/v2/reload`. ## When to use - Logs are missing, late, or incomplete at the log backend. - Fluent Bit pods crash, restart, or are not Ready. - Records arrive without `kubernetes` fields, or with the raw `