Describe the bug
We are trying to set up Fluent Bit in a high-availability configuration with 3 replicas. Each pod is processing the same Kubernetes events, leading to duplication of events when sending them to S3.
No available filter for deduplication
To Reproduce
Deploy Fluent Bit as a Deployment with 3 replicas.
Configure the input plugin for Kubernetes events as described in the documentation.
Configure the output plugin to send events to S3.
Configuration files: server, input, filters and output
input-kubernetes.conf: |
[INPUT]
name kubernetes_events
tag k8s_events
kube_url https://kubernetes.default.svc
db /var/log/event.db
DB.Sync normal
filter-kubernetes.conf: |
Section Kubernetes specific filter, DO NOT CHANGE
[FILTER]
Name kubernetes
Match kube.*
Kube_URL https://kubernetes.default.svc:443
Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token
Annotations Off
Merge_Log Off
Labels Off
K8S-Logging.Parser On
K8S-Logging.Exclude On
Kube_meta_preload_cache_dir ${FLUENT_META_CACHE_DIR}
Regex_Parser custom-kube-filter
Kube_Tag_Prefix kube.
tls.verify Off
output-s3.conf: |
[OUTPUT]
Name s3
Match *
Bucket ${FLUENT_OS_BUCKET}
Region ${FLUENT_OS_REGION}
Endpoint ${FLUENT_OS_LOCATION}
Total_File_Size 90M
Store_Dir_Limit_Size 200M
**Expected behavior**
Fluent Bit should ensure that events are processed only once and sent to S3 without duplication.
**Screenshots**
<img width="1350" alt="image" src="https://github.com/fluent/fluent-bit/assets/128414402/ded5f554-69df-4f1e-aac9-01a557f41e71">
**Your Environment**
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used: 2.2
* Environment name: Kubernetes
* Filters and plugins: grep, lua, etc
Anything i am missing ?
Bug Report
Describe the bug We are trying to set up Fluent Bit in a high-availability configuration with 3 replicas. Each pod is processing the same Kubernetes events, leading to duplication of events when sending them to S3. No available filter for deduplication
To Reproduce
Configure the output plugin to send events to S3.
Configuration files: server, input, filters and output
apiVersion: v1 kind: ConfigMap metadata: name: {{ .Values.configMapName }}-config namespace: {{ .Values.namespace }} labels: app: {{ .Values.appName }} data: fluent-bit.conf: | [SERVICE] Flush 5 Grace 20 {{- if .Values.fluentbit.enable_debug }} Log_Level debug {{- else }} Log_Level debug {{- end }} Daemon off Parsers_File parsers.conf HTTP_Server Off HTTP_Listen 0.0.0.0 HTTP_Port 2020 @INCLUDE input-kubernetes.conf @INCLUDE filter-kubernetes.conf @INCLUDE output-s3.conf
input-kubernetes.conf: | [INPUT] name kubernetes_events tag k8s_events kube_url https://kubernetes.default.svc db /var/log/event.db DB.Sync normal
filter-kubernetes.conf: |
Section Kubernetes specific filter, DO NOT CHANGE
output-s3.conf: | [OUTPUT] Name s3 Match * Bucket ${FLUENT_OS_BUCKET} Region ${FLUENT_OS_REGION} Endpoint ${FLUENT_OS_LOCATION} Total_File_Size 90M Store_Dir_Limit_Size 200M
Compression gzip