<p>I have 20 VM Instance on GCE with kubernetes self install (using the following <a href="https://medium.com/edureka/install-kubernetes-on-ubuntu-5cd1f770c9e4" rel="nofollow noreferrer">https://medium.com/edureka/install-kubernetes-on-ubuntu-5cd1f770c9e4</a>).</p>

<p>I want all the pod was created on pods node read/write files from one shared storage.</p>

<p>Example:</p>

<pre><code>pod1 on node1 write file to /some/shared/directory/pod1file.txt
pod12 on node12 read the file /some/shared/directory/pod1file.txt
...
</code></pre>

<p>How can I do it?</p>

samisaviv
<p>First thing to do would be to go to kubernetes volumes <a href="https://kubernetes.io/docs/concepts/storage/volumes/#types-of-volumes" rel="nofollow noreferrer">docs</a>, and see from the available storage options which supports shared volumes; like <code>gluster</code> or <code>ceph</code>.</p>

<p>As coderanger is mentioning, you can also use <code>nfs</code>, and go for <code>Filestore</code>. The drawback is the price here. <code>Filestore</code> is not cheap, to not say it is expensive. And the minimum storage to get is 1TB, I think, so if you need say 100GB storage, not possible. Now, that's the ONLY storage service you can use on <code>GCP</code>, as Managed Service.</p>

<p>If not <code>Filestore</code> you are left with creating your own <code>gluster</code>, for example, or any other shared storage on GCE, and mount it into your pods.</p>
