Kubernetes with Fluent-Bit

k8s logs fluent bit

The following manual will help you integrate your Kubernetes logs to Coralogix using Fluent-Bit.

See other tutorials for:


Before you will begin, make sure that you already have:

  • Installed Kubernetes Cluster
  • Enabled RBAC authorization mode support


First, you should create Kubernetes secret with Coralogix credentials:

$ kubectl -n kube-system create secret generic fluent-bit-coralogix-account-secrets \

You should receive something like:

secret "fluent-bit-coralogix-account-secrets" created

Then you need to create fluent-bit-coralogix-logger resources on your Kubernetes cluster with these manifests:

$ kubectl create -f
$ kubectl create -f
Plugin based
$ kubectl create -f
$ kubectl create -f
Native based
$ kubectl create -f
$ kubectl create -f


serviceaccount "fluent-bit-coralogix-service-account" created
clusterrole "fluent-bit-coralogix-service-account-role" created
clusterrolebinding "fluent-bit-coralogix-service-account" created
configmap "fluent-bit-coralogix-config" created
daemonset "fluent-bit-coralogix-daemonset" created
service "fluent-bit-coralogix-service" created

Now fluent-bit-coralogix-logger collects logs from your Kubernetes cluster.

Here is the example of log record:

    "log": " - - [05/Apr/2020:22:59:52 +0000] \"GET / HTTP/1.1\" 200 6 \"\" \"kube-probe/1.18\"\n",
    "stream": "stdout",
    "time": "2020-04-05T22:59:52.096035683Z",
    "kubernetes": {
        "pod_name": "dashboard-metrics-scraper-84bfdf55ff-l66cf",
        "namespace_name": "kubernetes-dashboard",
        "labels": {
            "k8s-app": "dashboard-metrics-scraper",
            "pod-template-hash": "84bfdf55ff"
        "annotations": {
            "": "runtime/default"
        "host": "minikube",
        "container_name": "dashboard-metrics-scraper",
        "container_image": "kubernetesui/metrics-scraper:v1.0.2"


If you want to remove fluent-bit-coralogix-logger from your cluster, execute this:

$ kubectl -n kube-system delete secret fluent-bit-coralogix-account-secrets
$ kubectl -n kube-system delete svc,ds,cm,clusterrolebinding,clusterrole,sa \
     -l k8s-app=fluent-bit-coralogix-logger

Start solving your production issues faster

Let's talk about how Coralogix can help you better understand your logs

Managed, Scaled and Compliant ELK Stack

No credit card required

Get a personalized demo

Jump on a call with one of our experts and get a live personalized demonstration