Reputation: 6360
I use company originated cloud environment which doesn't allow us to use node log collector and asks us to use a sidecar container to ship logs to ELK. However our container prints all the logs to stdout/stderr by following the 12 factor app practice.
Is there any way to collect stdout/stderr logs using a sidecar container (Prefered to use Filebeat)? I was checking documentation but it's not clearly mentioned anywhere.
There's another way in which I print all the logs to the specific directory within app container and share the volume with the sidecar Filebeat container. However, with this approach, I should think about the log rotation as well, which introduces more complexity. (Probably I need to create another container to aggregate logs and rotate logs.)
I think the recommended approach could be
Upvotes: 1
Views: 1283
Reputation: 17689
Consider one of the below options
OR
Configure Fluentd pod to push the logs to Elasticsearch.
Upvotes: 0