<p>I would like to use persistent disk in my replication controller but if i use a <code>gcePersistentDisk</code> the console returns me an error</p>

<blockquote>
  <p>ReadOnly must be true for replicated pods > 1, as GCE PD can only be mounted on multiple machines if it is read-only.</p>
</blockquote>

<p>From the error message and from the <a href="http://kubernetes.io/v1.1/docs/user-guide/volumes.html#gcepersistentdisk" rel="nofollow">docs</a>:</p>

<blockquote>
  <p>A feature of PD is that they can be mounted as read-only by multiple consumers simultaneously. This means that you can pre-populate a PD with your dataset and then serve it in parallel from as many pods as you need. Unfortunately, PDs can only be mounted by a single consumer in read-write mode - no simultaneous readers allowed. </p>
</blockquote>

<p>So you have two options to fix this:</p>

<ol>
<li>Set the <code>replicas</code> in your ReplicationController to 1</li>
<li><p>Make the volume <code>readOnly: true</code></p>

<pre><code>gcePersistentDisk:
  pdName: my-data-disk
  fsType: ext4
  readOnly: true
</code></pre></li>
</ol>
