The configuration of Fluentd is based on the configuration files from a Fluentd project on GitHub, fluentd-kubernetes-daemonset. The project contains Fluentd configuration files for how to collect log records from containers that run in Kubernetes and how to send them to Elasticsearch once they have been processed. We can reuse this configuration without changes and it will simplify our own configuration to a great extent. The Fluentd configuration files can be found at https://github.com/fluent/fluentd-kubernetes-daemonset/tree/master/docker-image/v1.4/debian-elasticsearch/conf.
The configuration files that provide this functionality are kubernetes.conf and fluent.conf. The kubernetes.conf configuration file contains ...