Is there a way to exclude certain namespaces in fluent-bit
? I would like to exclude certain namespaces, so that fluent-bit
doesn't forward all logs created in those namespaces to ELK.
Is there a way to do it besides adding annotation to each pod in that namespace? I'm aware that you can update all of the pods annotations in a namespace via kubectl.
kubectl annotate pods --namespace=pks-system --all fluentbit.io/exclude='true'
Exclude_Path /var/log/containers/*_kube-system_*.log,/var/log/containers/*_kubernetes-dashboard_*.log,/var/log/containers/*_yourspecialnamespace_*.log
which works for me. – Bibcock