<p>I am trying to install jenkins on my kubernetes cluster under <code>jenkins</code> namespace. When I deploy my pv and pvc, the pv remains available and does not bind to my pvc.</p>
<p>Here is my yamls:</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: jenkins
  labels:
    type: jenkins
spec:
  storageClassName: standard
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: &quot;/mnt/data&quot;
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jenkins-pv-claim
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
</code></pre>
<p>Below is my Storageclass for manual. Standard class has not been changed, should be the same as the default standard on kubernetes.</p>
<pre><code>apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {&quot;apiVersion&quot;:&quot;storage.k8s.io/v1&quot;,&quot;kind&quot;:&quot;StorageClass&quot;,&quot;metadata&quot;:{&quot;annotations&quot;:{},&quot;name&quot;:&quot;manual&quot;},&quot;provisioner&quot;:&quot;kubernetes.io/no-provisioner&quot;,&quot;volumeBindingMode&quot;:&quot;WaitForFirstConsumer&quot;}
  creationTimestamp: &quot;2021-06-14T14:41:39Z&quot;
  name: manual
  resourceVersion: &quot;3643100822&quot;
  uid: 8254d900-58e5-49e1-a07e-1830096aac87
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer

</code></pre>

<p>Based on the storage class spec, I think the problem is the <code>volumeBindingMode</code> being set as <code>WaitForFirstConsumer</code> which means the PV will remain unbound until there is a Pod to consume it.</p>
<p>You can change it <code>Immediate</code> to allow the PV to be bound immediately without requiring to create a Pod.</p>
<p>You can read about the different volume binding modes in detail in the <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode" rel="nofollow noreferrer">docs</a>.</p>
