Lab 2 - Installing Fluent Bit in a container

Lab Goal

To install using a container image with Podman open source container tooling and run the container on your local machine.

Container - Installing Podman tooling

Installing Fluent Bit using a container image is going to be demonstrated here using the open source project Podman. It's assumed you have already installed the Podman commandline tooling previously.

If you want to use other container tooling, such as Docker, most of the commands are the same with just a substitution of the tooling name (docker instead of podman).

Container - Starting Podman machine

You need to make sure that the Podman virtual machine has been started, so, assuming you have initialized a podman machine already:
							
								podman machine start
							
						

Container - Running container image

It's pretty straight forward to running Fluent Bit in a container, just start the container image as follows:
							
								podman run --rm --name fb -ti ghcr.io/fluent/fluent-bit:4.0.3
							
						
The details in this command are a flag that automatically removes the container after we stop it just to keep our registry tidy (--rm), that we give the container a name we can reference (--name fb), assign it a console for output and stay interactive (-ti), and use the image version supported in this workshop (ghcr.io/fluent/fluent-bit:4.0.3).

Container - What's Fluent Bit doing?

You'll notice the container starts and takes over the console for its output, where Fluent Bit is measuring CPU usage and dumping it to the console (CTRL-C will stop the container):
							
								Fluent Bit v4.0.3
								* Copyright (C) 2015-2025 The Fluent Bit Authors
								* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
								* https://fluentbit.io

								______ _                  _    ______ _ _             ___  _____
								|  ___| |                | |   | ___ (_) |           /   ||  _  |
								| |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   __/ /| || |/' |
								|  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| ||  /| |
								| |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V /\___  |\ |_/ /
								\_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/     |_(_)___/


								[2025/07/09 10:30:00] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
								[2025/07/09 10:30:00] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
								[2025/07/09 10:30:00] [ info] [simd    ] disabled
								[2025/07/09 10:30:00] [ info] [cmetrics] version=1.0.3
								[2025/07/09 10:30:00] [ info] [ctraces ] version=0.6.6
								[2025/07/09 10:30:00] [ info] [input:cpu:cpu.0] initializing
								[2025/07/09 10:30:00] [ info] [input:cpu:cpu.0] storage_strategy='memory' (memory only)
								[2025/07/09 10:30:00] [ info] [sp] stream processor started
								[2025/07/09 10:30:00] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
								[2025/07/09 10:30:00] [ info] [output:stdout:stdout.0] worker #0 started
								[0] cpu.local: [[1733738024.164564312, {}], {"cpu_p"=>0.000000, "user_p"=>0.000000, "system_p"=>0.000000, "cpu0.p_cpu"=>0.000000, "cpu0.p_user"=>0.000000, "cpu0.p_system"=>0.000000, "cpu1.p_cpu"=>0.000000, "cpu1.p_user"=>0.000000, "cpu1.p_system"=>0.000000, "cpu2.p_cpu"=>0.000000, "cpu2.p_user"=>0.000000, "cpu2.p_system"=>0.000000, "cpu3.p_cpu"=>0.000000, "cpu3.p_user"=>0.000000, "cpu3.p_system"=>0.000000}]
								[0] cpu.local: [[1733738025.163455189, {}], {"cpu_p"=>0.250000, "user_p"=>0.000000, "system_p"=>0.250000, "cpu0.p_cpu"=>0.000000, "cpu0.p_user"=>0.000000, "cpu0.p_system"=>0.000000, "cpu1.p_cpu"=>0.000000, "cpu1.p_user"=>0.000000, "cpu1.p_system"=>0.000000, "cpu2.p_cpu"=>0.000000, "cpu2.p_user"=>0.000000, "cpu2.p_system"=>0.000000, "cpu3.p_cpu"=>1.000000, "cpu3.p_user"=>0.000000, "cpu3.p_system"=>1.000000}]
								...
							
						
(Scroll to the right to see log lines)

Intermezzo - What to do with any failures?

At any time in the workshop should you encounter failures, during installation, testing, data population, or build results. Don't worry, this can be rerun any time after you fix any problems reported. Just stop and restart it (CTRL-C for interactive containers in your console):
							
								podman run --rm --name fb -ti ghcr.io/fluent/fluent-bit:4.0.3
							
						

Intermezzo - Shutdown your container environment

At anytime in the workshop you can pause and come back later. To do this we stop our container environment by stopping the running Fluent Bit container and then shutting down our Podman virtual machine as follows (after stopping any running containers with CTRL-C):
							
								podman machine stop
							
						

Lab completed - Results

							
								Fluent Bit v4.0.3
								* Copyright (C) 2015-2025 The Fluent Bit Authors
								* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
								* https://fluentbit.io

								______ _                  _    ______ _ _             ___  _____
								|  ___| |                | |   | ___ (_) |           /   ||  _  |
								| |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   __/ /| || |/' |
								|  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| ||  /| |
								| |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V /\___  |\ |_/ /
								\_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/     |_(_)___/


								[2025/07/09 10:30:00] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
								[2025/07/09 10:30:00] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
								[2025/07/09 10:30:00] [ info] [simd    ] disabled
								[2025/07/09 10:30:00] [ info] [cmetrics] version=1.0.3
								[2025/07/09 10:30:00] [ info] [ctraces ] version=0.6.6
								[2025/07/09 10:30:00] [ info] [input:cpu:cpu.0] initializing
								[2025/07/09 10:30:00] [ info] [input:cpu:cpu.0] storage_strategy='memory' (memory only)
								[2025/07/09 10:30:00] [ info] [sp] stream processor started
								[2025/07/09 10:30:00] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
								[2025/07/09 10:30:00] [ info] [output:stdout:stdout.0] worker #0 started
								[0] cpu.local: [[1733738024.164564312, {}], {"cpu_p"=>0.000000, "user_p"=>0.000000, "system_p"=>0.000000, "cpu0.p_cpu"=>0.000000, "cpu0.p_user"=>0.000000, "cpu0.p_system"=>0.000000, "cpu1.p_cpu"=>0.000000, "cpu1.p_user"=>0.000000, "cpu1.p_system"=>0.000000, "cpu2.p_cpu"=>0.000000, "cpu2.p_user"=>0.000000, "cpu2.p_system"=>0.000000, "cpu3.p_cpu"=>0.000000, "cpu3.p_user"=>0.000000, "cpu3.p_system"=>0.000000}]
								[0] cpu.local: [[1733738025.163455189, {}], {"cpu_p"=>0.250000, "user_p"=>0.000000, "system_p"=>0.250000, "cpu0.p_cpu"=>0.000000, "cpu0.p_user"=>0.000000, "cpu0.p_system"=>0.000000, "cpu1.p_cpu"=>0.000000, "cpu1.p_user"=>0.000000, "cpu1.p_system"=>0.000000, "cpu2.p_cpu"=>0.000000, "cpu2.p_user"=>0.000000, "cpu2.p_system"=>0.000000, "cpu3.p_cpu"=>1.000000, "cpu3.p_user"=>0.000000, "cpu3.p_system"=>1.000000}]
								...
							
						
Next up, exploring observability pipelines...
references

Contact - are there any questions?

Eric D. Schabell
Director Evangelism
Contact: @ericschabell {@fosstodon.org) or https://www.schabell.org

Up next in workshop...

Lab 3 - Exploring first pipelines