This repository contains the code explained in this article
Is used to deploy a Fluent Bit chart to collect logs from your Kubernetes cluster and send them to S3 using partitioned folder structure that consider the namespace and (for this case) the app name label extracted from the metadata but could be easily modified to consider other labels/needs.
Feel free to use this repo as a template and edit it to fit your needs.
You probably wish to change the values in the custom_script.lua file to extract the labels you need from the kubernetes object, and then using them in the rewrite_rule
Before installing the app just consider that you need to create a secret called s3-auth in the namespace
you wish to install the chart to access your S3 bucket with the following keys access_key and secret_key
We got 2 files the values.yaml and the argoproject.yaml
- values.yaml is the values file for the Fluent Bit chart
- argoproject.yaml is the ArgoCD application file in case you need to deploy it using ArgoCD