title: Kubernetes: StorageClass with local provisioner and StatefulSet kind
body: <p>One of my pods has 'StatefulSet' kind with volumeClaimTemplates section referring to a StorageClass(SC) I created, see below.</p>
  
  <p>SC:</p>
  
  <pre><code>apiVersion: storage.k8s.io/v1
  kind: StorageClass
  metadata:
    name: local-storage
  provisioner: kubernetes.io/no-provisioner
  volumeBindingMode: WaitForFirstConsumer
  </code></pre>
  
  <p>StatefulSet YAML with reference to above created SC:</p>
  
  <pre><code>volumeClaimTemplates:
      - metadata:
          name: mydata
        spec:
          storageClassName: local-storage
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 2Gi
  </code></pre>
  
  <p>As far as I am aware, a StatefulSet will create node specific PVCs without a need for explicit PV and PVC set up, I see that PV being created but the pod status is 'pending' with below warning.</p>
  
  <blockquote>
    <p>Warning  FailedScheduling  default-scheduler  0/4 nodes are available: 4 node(s) didn't find available persistent volumes to bind.</p>
  </blockquote>
  
  <p>Note that I don't have a default StorageClass set up in the cluster, I believe that's not required for this scenario, is that correct?
  Do we need to enable or configure anything for 'local' provisioner to work in the cluster?</p>
  
  <p>Thanks</p>