Fluent plugin for get simple metadata of k8s
Install it yourself as:
$ gem install fluent-plugin-k8s
<filter **>
@type k8s
</filter>
<source>
@type file
path /var/log/containers/*.log
tag raw.kubernetes.**
</source>
<filter raw.kubernetes.**>
@type k8s
</filter>
<match **>
@type stdout
</match>
The k8S you can get include POD name, namespace, Container name, and dockerId.
{
"pod_name": "influxdb-1",
"namespace_name": "monitoring",
"container_name": "influxdb"
}