I'm trying to figure a way of building a configuration file/script that can help me retrieve the logs of the Kubernetes pod into elastic but using Binary fluent-bit only.
I was managed to retrieve the logs from the pod into elastic using the following code:
./fluent-bit -i stdin -o es -p Host=elasticsearch -p Port=9200 -p Index=myindex -p HTTP_User=myuser -p HTTP_Passwd=dsfsgsdfg < < here i run a script to take it from the proc folder and echo it.
but i have an issue that the pod details like pod name,pod id,etc are not passing. is there a way to get the logs of the pod in a more elegant way? and also retrieve the pod details? right now I take it from the /proc/?/fd/1 Folder using some ugly script. if i can do it using configuration file it can be amazing.