We are creating a file in a pod which should be only readable by process running in a pod. Is there a way to restrict the access of a file so that only pod can read the content of the file ?
While building the container you can
create a user.
RUN useradd -ms /bin/bash newuser
Change the ownership of file
chown "username" "filename"
chmod 600 "filename"