How to Push Kubernetes (EKS) Logs to Cloudwatch logs with separate log streams based on application name

12/18/2018

I have a scenario where I need to push application logs running on EKS Cluster to separate cloudwatch log streams. I have followed the below link, which pushes all logs to cloudwatch using fluentd. But the issue is, it pushes logs to a single log stream only.

https://github.com/aws-samples/aws-workshop-for-kubernetes

It also pushes all the logs under /var/lib/docker/container/*.log. How Can I filter this to can only application specific logs?

-- Divy
amazon-cloudwatchlogs
amazon-eks
fluentd
kubernetes

1 Answer

3/13/2019

Collectord now supports AWS CloudWatch Logs (and S3/Athena/Glue). It gives you flexibility to choose to what LogGroup and LogStream you want to forward the data (if the default does work for you).

Highly recommend to read Setting up comprehensive centralized logging with AWS Services for Kubernetes

-- outcoldman
Source: StackOverflow