My Deployment VolumeMount Config. jane-vol means EFS volume
volumeMounts:
- name: jane-vol
mountPath: /mnt/utils
subPath: utils
In my pod, I can see the volume mounted as a root
$cd /mnt/
$ll
drwxr-xr-x 2 root root 6144 2월 4 19:42 utils
However, I want to change the root:root -> jane:jane.
How can I do this only in Deployment.
Is there a way to handle this only on Deployment?
I would appreciate if someone could give me some advice.
A good practice, to avoid modifying the docker image just for this use case, would be to add an initContainer
that modifies the volume mount user permissions:
https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-initialization/