fluent / helm-charts

Helm Charts for Fluentd and Fluent Bit
Apache License 2.0
377 stars 452 forks source link

[fluent-bit] Kubernetes filter Use_Kubelet causes kubelet upstream connection error #139

Open lifttocode opened 3 years ago

lifttocode commented 3 years ago

I'm getting the following error when the Use_Kubelet option is set to On

[error] [filter:kubernetes:kubernetes.0] kubelet upstream connection error

and I'm guessing it's related to the following from the doc

The key point is to set hostNetwork to true and dnsPolicy to ClusterFirstWithHostNet that fluent bit DaemonSet could call Kubelet locally. Otherwise it could not resolve the dns for kubelet.

but currently, the chart doesn't support adding the above configuration to daemonset spec.

hostalp commented 2 years ago

Yes, even though hostNetwork and dnsPolicy settings are present in values.yaml, they aren't used in daemonset.yaml or deployment.yaml. It should be an easy fix by just adding:

    hostNetwork: {{ .Values.hostNetwork }}
    dnsPolicy: {{ .Values.dnsPolicy }}

to the spec sections of the mentioned files.