apiVersion: v1
kind: ConfigMap
metadata:
  name: fluentdconf
  namespace: logging
data:
  fluent.conf: |
    <match fluent.**>
      @type null
    </match>
    <source>
      @type tail
      path /var/log/containers/*.log
      pos_file /var/log/fluentd-containers.log.pos
      time_format %Y-%m-%dT%H:%M:%S.%NZ
      tag kubernetes.*
      format json
      read_from_head false
    </source>
    <filter kubernetes.**>
      @type kubernetes_metadata
    </filter>
    <match kubernetes.var.log.containers.**fluentd**.log>
      @type null
    </match>
    <match kubernetes.**>
      @type stdout
    </match>
