Does filebeat support fetching logfiles from defined kubernetes pods?

Out of the box filebeat fetches each container in k8s environment.
However i have some pods which belong to plugins or controllers which i dont want to process.

I already had a look into:
https://www.elastic.co/guide/en/beats/filebeat/master/filebeat-reference-yml.html
...

Use this to read from all containers, replace * with a container id to read from one:

#containers:

stream: all # can be all, stdout or stderr

ids:

- '*'

This would help me restrict on container level. But there is no option which would help me to restrict to pod name level ?

Any ideas if my usecase is supported somehow ?

Thank you for your time !

@Crusader I think you could achieve what you want using Filebeat's autodiscover for k8s and with template conditions to start or skip log monitoring.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.