Pod run as non root user
anaconda2196 opened this issue · 0 comments
anaconda2196 commented
I want to deploy dcgm-exporter pod as non-root user.
In values.yaml I made below changes but pod is crashingoff!
Case 1:
securityContext:
runAsNonRoot: true
runAsUser: 1002
# capabilities:
# add: ["SYS_ADMIN"]
# readOnlyRootFilesystem: true
kubectl -n kube-system logs dcgm-exporter-6nwvl
unable to set CAP_SETFCAP effective capability: Operation not permitted
Case:2
securityContext:
runAsNonRoot: true
#runAsUser: 1002
# capabilities:
# add: ["SYS_ADMIN"]
# readOnlyRootFilesystem: true
Error: container has runAsNonRoot and image will run as root
Is it possible to change and run as non root user or Is this a requirement for the dcgm-exporter to work as root user?