#@include file-fluent.conf
apiVersion: v1
kind: ConfigMap
metadata:
name: fluentd-config
namespace: fluentd
data:
fluent.conf: |-
################################################################
# This source gets all logs from local docker host
@include pods-fluent.conf
@include elastic-fluent.conf
pods-fluent.conf: |-
@type tail
read_from_head true
tag kubernetes.*
path /var/log/containers/*.log
pos_file /var/log/fluentd-containers.log.pos
exclude_path ["/var/log/containers/fluent*"]
@type json
time_format %Y-%m-%dT%H:%M:%S.%NZ
file-fluent.conf: |-
@type file
path /tmp/file-test.log
elastic-fluent.conf: |-
@type elasticsearch
host "#{ENV['FLUENT_ELASTICSEARCH_HOST'] || 'elasticsearch.elastic-kibana'}"
port "#{ENV['FLUENT_ELASTICSEARCH_PORT'] || '9200'}"
index_name fluentd-k8s
type_name fluentd