fabric8io / fluent-plugin-kubernetes_metadata_filter

Enrich your fluentd events with Kubernetes metadata
Apache License 2.0
351 stars 166 forks source link

[filter_kubernetes_metadata] !! The environment variable 'K8S_NODE_NAME' is not set to the node name which can affect the API server and watch efficiency !! #305

Closed joenzx closed 3 years ago

joenzx commented 3 years ago

Hello, I updated the mirror version of the fluentd_elasticsearch today, and the following warning appeared after running. I did not change the things in configMap, and I really could not find the reason. 2021-09-03 15:18:59 +0800 [warn]: [filter_kubernetes_metadata] !! The environment variable 'K8S_NODE_NAME' is not set to the node name which can affect the API server and watch efficiency !!

fluentd-configmap.yaml `<filter **> @id filter_concat @type concat key log multiline_start_regexp /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}/ separator "\n" timeout_label @NORMAL

<filter **>
  @id filter_kubernetes_metadata
  @type kubernetes_metadata
</filter>

<filter **>
  @id filter_parser
  @type parser                
  key_name log                
  reserve_data true           
  remove_key_name_field true  
  <parse>
    @type multi_format
    <pattern>
      format json
    </pattern>
    <pattern>
      format none
    </pattern>
  </parse>
</filter>

<filter kubernetes.**>
  @type record_transformer
  remove_keys $.docker.container_id,$.kubernetes.container_image_id,$.kubernetes.pod_id,$.kubernetes.namespace_id,$.kubernetes.master_url,$.kubernetes.labels.pod-template-hash
</filter>`

vsersion fluentd_elasticsearch:v3.3.0

joenzx commented 3 years ago

README.md