<p>I'm trying to run an api (based on Symfony) with kubernetes thanks to Google Container Engine (GKE).
This API also allow user to store and download files, which are supposed to be saved somewhere.</p>

<p>I tried to run it with 1 replica, and noticed a downtime of the service during the creation of the new container. It looks like at least 2 replicas are needed to avoid downtime.</p>

<p>Taking that into consideration, I'm interested about these options :</p>

<ul>
<li>A volume based on Google Persistent Disk. Would this mean that all my replicas would be on the same node ? (ReadWriteOnce access mode). If so, in case of a node failure, my service would not be available.</li>
<li>A volume based on Flocker (Backend Persistent Disk). What is the recommended way to install it on GKE ?</li>
</ul>

<p>Is there another interesting option ? What would you recommend ?</p>

<p>Using GCS (like tex mentioned) is probably the simplest solution (and will be very fast from a GKE cluster). Here is <a href="https://stackoverflow.com/questions/33591580/how-to-upload-files-to-google-cloud-storage-with-symfony-gauferette-vichuplo">an answer that may help</a>.</p>

<p>If you have a specific need for local persistent storage, you can use Google Persistent Disks, but they can only be mounted as writable in one place.</p>

<p><a href="http://kubernetes.io/docs/user-guide/petset/" rel="nofollow noreferrer">Petsets</a> (currently alpha) will provide better support for distributed persistent in-cluster storage, so you can also look into that if GCS doesn't work for you.</p>
