What linux capabilities needed to run as non-root? #396
-
I am trying to harden vector, and I have the following securityContext. This is a kustomize patch: spec:
template:
spec:
automountServiceAccountToken: false
securityContext:
fsGroup: 65534
seccompProfile:
type: RuntimeDefault
containers:
- imagePullPolicy: IfNotPresent
name: vector
image: timberio/vector:0.38.X-debian
securityContext:
runAsNonRoot: true
runAsUser: 65534
runAsGroup: 65534
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL After setting that, I have the following error:
I have tried to add |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think the issue here is that the user you are running |
Beta Was this translation helpful? Give feedback.
I think the issue here is that the user you are running
vector
as in the container doesn't have permissions to read the k8s log files from disk. I think best-practice would be to give the user permissions, but otherwise I thinkCAP_FOWNER
might do it 🤔