<p>I'm running Docker Desktop with Kubernetes.</p>
<p>I can ssh to the node and I have other pods running on the node.</p>
<p>However, when I apply a StatefulSet to the cluster I get:</p>
<pre><code>0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
</code></pre>
<p>The Stateful Set is here:</p>
<p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#components" rel="noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#components</a></p>
<pre><code>kubectl get no
NAME             STATUS   ROLES           AGE    VERSION
docker-desktop   Ready    control-plane   6d2h   v1.24.1
</code></pre>

Snowcrash
<p>If you are applying the manifest defined <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#components" rel="noreferrer">here</a> as it is, the problem is in the below snippet, particularly with the <code>storageClassName.</code>  Likely, your cluster does <strong>not</strong> have a storage class called <code>my-storage-class.</code></p>
<pre><code> volumeClaimTemplates:
  - metadata:
      name: www
    spec:
      accessModes: [ &quot;ReadWriteOnce&quot; ]
      storageClassName: &quot;my-storage-class&quot;
      resources:
        requests:
          storage: 1Gi
</code></pre>
<p>To get the definitive error statement, you can run the following command:</p>
<pre><code>kubectl describe  pvc www-web-0
</code></pre>
<p>you will notice something like:</p>
<pre><code>storageclass.storage.k8s.io &quot;my-storage-class&quot; not found
</code></pre>
<p><strong>Solution:</strong></p>
<p>You can run the following command to get your cluster's available <code>storage class</code> and replace it in yaml file.</p>
<pre><code>kubectl get sc
</code></pre>
<p>Alternatively, you can delete the <code>storageClassName</code> and let the default storage class do the magic. However, for this to work, you must have a default sc present in your cluster.</p>
<p>If you have no storage class present, you need to create one. Check <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/" rel="noreferrer">this</a> out.</p>
