Deploy Fluent Bit

Let’s start by downloading the fluentbit.yaml deployment file and replace some variables.

cd ~/environment/logging

# get the Amazon OpenSearch Endpoint
export ES_ENDPOINT=$(aws es describe-elasticsearch-domain --domain-name ${ES_DOMAIN_NAME} --output text --query "DomainStatus.Endpoint")

curl -Ss \
    | envsubst > ~/environment/logging/fluentbit.yaml

Explore the file to see what will be deployed. The fluent bit log agent configuration is located in the Kubernetes ConfigMap and will be deployed as a DaemonSet, i.e. one pod per worker node. In our case, a 3 node cluster is used and so 3 pods will be shown in the output when we deploy.

kubectl apply -f ~/environment/logging/fluentbit.yaml

Wait for all of the pods to change to running status

kubectl --namespace=logging get pods


fluent-bit-2wrs4   1/1     Running   0          6s
fluent-bit-9lkkm   1/1     Running   0          6s
fluent-bit-x545p   1/1     Running   0          6s