<p>I have a Kubernetes cron job in AWS EKS that requires a persistent volume, so this is roughly what I have:</p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name:  pvc-{{$.Release.Name}}-tmp
spec:
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: 10Gi 
</code></pre>
<p>Then it's mounted to a cronjob (the mount part is correct, as the following shows)</p>
<p>All are deployed with Helm, and a fresh deployment times out, because the PVC remains in the <code>Pending</code> state with the message <code>waiting for the first consumer to be created before binding</code>. If during the deployment I create a new job based on the cron job, the PVC is immediately bound and this and all subsequent deployment work like expected.</p>
<p>Is it possible to either make a PVC bind &quot;eagerly&quot;, without a pod that requires it or, preferably, not to wait for it to get bound during the chart installation?</p>

bereal
<p>What is the storage class that you use? Storage class has <code>volumeBindingMode</code> attributes that controls how PV is dynamically created.</p>
<p>The <code>volumeBindingMode</code> could be <code>Immediate</code> and <code>WaitForFirstConsumer</code> mode.</p>
<p>For checking the storage class you can do <code>kubectl get storageclass</code> or <code>kubectl describe storageclass</code>. The default storage class will be used if not specified on the K8 PVC definition.</p>
<p>References:</p>
<ul>
<li><a href="https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode</a></li>
</ul>
