-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-for-fluent-bit pod ignores k8 security context values like runAsUser, runAsGroup, fsGroup, and runAsNonRoot #729
Comments
I'm not sure about this; I'm testing it out myself in an EKS cluster today. Existing guidance I can find suggests that since the pod log files are root owned, FLB must also run as root:
However, this doesn't make sense to me... I think if we give FLB the right capabilities it should be able to read the pod log files and probably even create its storage directory. https://man7.org/linux/man-pages/man7/capabilities.7.html I'll post here once I'm done testing. |
Alrighty, it seems that adding extra capabilities does not work:
I got this even though I set:
|
And of course, if you use host volume mounts for the tail DB or the
|
Those capabilities can be used in known container breakout attacks, so even if adding them worked, this likely still wouldn't satisfy the true goal of non-root, which is to lock down containers. I'm very surprised it does not work though, I guess I don't understand those linux capabilities. |
Describe the question/issue
I am trying to run the
aws-for-fluent-bit
container with a non-root user usingthe below k8 manifest.Even though I explicitly set
fsGroup
to1000
here, I noticed that the/var/fluent-bit/state
directory gets created as root inside k8 host nodes.Also, with the above settings, fluent-bit pods go to a
CrashLoopBackOff
with the below errors on logs.As of these discussions on aws/eks-charts repo (aws/eks-charts#928) and fluent/fluent-bit repo (fluent/fluent-bit#872), I learned that this container has to run as root.
Can you please confirm my understanding?
If that is not the case, then is there a way to run the
aws-for-fluent-bit
container as a non-root user and with non-root-owned volumes?The text was updated successfully, but these errors were encountered: