Skip to content

feature request: support running fluent bit as non-root/not UID 0 #427

@oridool

Description

@oridool

Describe the question/issue

Our image scanning tool reports about potential risk with this image.
It appears that it is running with root user. Plus, it also uses 'hostPath' in the DaemonSet configuration.
Both things together are considered as a high risk.
Can the image be built with another non-privileged user?
Or even better, build it from distroless image ?

Configuration

DaemonSet configuration according to the AWS docs for Container Insights:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-setup-logs-FluentBit.html

yaml:
kubectl apply -f https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit.yaml

Fluent Bit Version Info

aws-for-fluent-bit:2.28.0

Steps to reproduce issue

C:\>kubectl exec fluent-bit-dphbz -- id
uid=0(root) gid=0(root) groups=0(root)

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature request or enhancement on existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions