Logging kubernetes container log to azure event hub using fluent-bit - error while loading shared libraries: librdkafka.so

4/13/2021

$ kubectl create namespace logging

$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-service-account.yaml

$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role.yaml

$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-binding.yaml

$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/0.13-dev/output/kafka/fluent-bit-configmap.yaml

After this getting error

/fluent-bit/bin/fluent-bit: error while loading shared libraries: librdkafka.so: cannot open shared object file: No such file or directory

And fluent-bit pod is creating but in CrashLoopBackOff

Ref - https://github.com/fluent/fluent-bit-kubernetes-logging

Can any one suggest how to resolve this

-- Jeebendu kumar Behera
azure-eventhub
fluentd
kubernetes

1 Answer

4/13/2021

Two things:

  1. Deploy all from master branch. You seem to be installing Kafka configmap from developer branch while the rest is from master.

  2. You skipped to create a Kafka deamonset. Do below.

    $ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/kafka/fluent-bit-ds.yaml

-- Serkant Karaca
Source: StackOverflow