<p>I have two services that I would like to access a PersistentVolumeClaim.</p>

<p>One is a StatefulSet that is reading from the volume (and serving content to end users), the other is a Kubernetes CronJob that periodically updates the contents of the data in obtained by a PVC.</p>

<p>Right now I'm running into the issue that my PVC is backed by a PV (not NFS, Ceph, or the like) and one service grabs the volume making the other not start.</p>

<p>How can I make it so both of these services have access to the volume?</p>

<p>And is there a way to add a CronJob to my StatefulSet the same way I add more containers?</p>

Darrien
<p>Have you checked the <code>accessModes</code> of your <code>pv</code> and <code>pvc</code>?</p>

<p>If you want more than one pod to be able to mount the volume you'll need to use <code>ReadOnlyMany</code> or <code>ReadWriteMany</code></p>

<p><a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="nofollow noreferrer">Persistent Volume Docs</a></p>

<p>As for your second question, no, there's no way to "add a CronJob to [a] StatefulSet". They are separate and distinct API objects.</p>
