In kubernetes you can set volumes permissions at pod ,pv or pvc levels. You can define pv | pvc as read only but still can write to the mount point if readOnly attribute is set to false which is pretty confusing. I have read a lot of articles about this but still can't fully understand the purpose.
What I inderstand:
- Permissions at pv level are for requesting available ressouces from the host file system with at least the same permissions defined in pv.
- Permissions at pvc level are for requesting pv with at least the same permissions defined in pvc.
- Permissions at pod level are for setting permissions to the mount point.
Please correct me if I'm wrong