Skip to content

[filter_kube] Rely on /pods endpoint of kubelet #1948

Closed
@loburm

Description

@loburm

Is your feature request related to a problem? Please describe.
This wasn't tested in Fluent Bit but we had a problem with FluentD before in huge clusters.

Instead of querying kube-apiserver for retrieving labels and annotations of pod, it would be great to add a way to rely on /pods endpoint of kubelet instead. This endpoint is kind of local cache for pods running on the node, so it completely makes sense to use it when Fluent Bit is deployed as a DaemonSet. Disadvantage: it doesn't support watches, which means it should periodically scan that endpoint, but I assume that's not an issue, because we are not using watches anyway, if I read code correctly.

Describe the solution you'd like
Parameter for kubernetes filter (for example, Use_Kubelet) that would disable dependency on kube-apiserver. Additionally we may need to specify kubelet port, if someone is using a non-standard (Kubelet_Port). When a log entry from a new pod arrives, it's going to scrape /pods endpoint of kubelet to retrieve metadata for all pods on that node.

Additionally I haven't found any argument to configure time to live of cache entries in kube_filter. This might be a problem, because no one forbids changing pod labels or annotations without restarting a pod.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions