<p>we're experimenting Kubernetes and thinking about migrating our webapp, currently hosted in a classic public cloud with vps and load balancing.</p>

<p>I'd like to know how to manage an upload folder (with write/read privileged) inside our dockerized app in which  files uploaded by our users are stored.</p>

<p>As we use lot of file uploading in our apps, would it be possible to have a persistent data storage in which the webapp can upload files in and manage them via webapp? Do I have to change the code of my app and save files to external object storages or there's a faster way to do it via local filesystem?</p>

<p>Thank you !</p>

<p>I'm guessing that if you are running more than one pod, you'd want some sort of shared filesystem?  So all uploaded documents are available in one location instead of scattered around several persistent volumes?  If that's the case, you want some sort of distibuted file storage like Amazon S3.  Even better, you could use a Kubernetes NFS so your code thinks it is using local filesystem but it is backed by a distributed file store.</p>

<p>Take a look at this example: <a href="https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs" rel="nofollow noreferrer">https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs</a>. The NFS can use a persistent volume from GKE, Azure, or AWS.</p>
