How to create a single Fluentd log stream for each Kubernetes service in AWS CloudWatch

In this blog post I show you how to create a single fluentd log stream per kubernetes micro service in AWS CloudWatch.

I was setting up logging for a kubernetes cluster (Amazon EKS) with fluentd. After I followed the tutorial provided by AWS, I found that the log streams showing in AWS CloudWatch are per container per pod. That means that you cannot see all the logs of a service in one place, because you have your logs from one service distributed over multiple log streams.

Being new to working with fluentd, it took me quite some time to change the configuration, so that you have all the logs of one service unified in a log stream, which, I think, makes much more sense as a default config. This blog post shows, how to do it.

Continue reading “How to create a single Fluentd log stream for each Kubernetes service in AWS CloudWatch”