title: 0/2 nodes are available: 1 node(s) didn't find available persistent volumes to bind, 1 node(s) had taints that the pod didn't tolerate
body: <p>I setup a k8s in a multiple node. But the PersistentVolume can not be created successfully, when I am trying to create a simple PostgreSQL.</p>
  
  <p>The StorageClass</p>
  
  <pre><code>kind: StorageClass
  apiVersion: storage.k8s.io/v1
  metadata:
    name: local-storage
  provisioner: kubernetes.io/no-provisioner
  volumeBindingMode: WaitForFirstConsumer
  </code></pre>
  
  <p>The StatefulSet is:</p>
  
  <pre><code>apiVersion: apps/v1
  kind: StatefulSet
  metadata:
    name: postgres
    namespace: kong
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: postgres
    serviceName: postgres
    template:
      metadata:
        labels:
          app: postgres
      spec:
        containers:
        - env:
            ...           
        volumeMounts:
          - mountPath: /var/lib/postgresql/data
            name: my-local-pv
            subPath: pgdata
        terminationGracePeriodSeconds: 60
    volumeClaimTemplates:
    - metadata:
        name: my-local-pv
      spec:
        storageClassName: local-storage
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
  </code></pre>
  
  <p>The describe pod:</p>
  
  <pre><code>Name:           postgres-0
  Namespace:      kong
  Priority:       0
  Node:           &lt;none&gt;
  Labels:         app=postgres
                  controller-revision-hash=postgres-9c9cf868d
                  statefulset.kubernetes.io/pod-name=postgres-0
  Annotations:    &lt;none&gt;
  Status:         Pending
  IP:             
  IPs:            &lt;none&gt;
  Controlled By:  StatefulSet/postgres
  Containers:
    postgres:
      Image:      postgres:9.5
      Port:       5432/TCP
      Host Port:  0/TCP
      Environment:
        POSTGRES_USER:      kong
        POSTGRES_PASSWORD:  kong
        POSTGRES_DB:        kong
        PGDATA:             /var/lib/postgresql/data/pgdata
      Mounts:
        /var/lib/postgresql/data from postgres-data (rw,path="pgdata")
        /var/run/secrets/kubernetes.io/serviceaccount from default-token-b5mkt (ro)
  Conditions:
    Type           Status
    PodScheduled   False 
  Volumes:
    postgres-data:
      Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
      ClaimName:  postgres-data-postgres-0
      ReadOnly:   false
    default-token-b5mkt:
      Type:        Secret (a volume populated by a Secret)
      SecretName:  default-token-b5mkt
      Optional:    false
  QoS Class:       BestEffort
  Node-Selectors:  &lt;none&gt;
  Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                   node.kubernetes.io/unreachable:NoExecute for 300s
  Events:
    Type     Reason            Age        From               Message
    ----     ------            ----       ----               -------
    Warning  FailedScheduling  &lt;unknown&gt;  default-scheduler  0/2 nodes are available: 1 node(s) didn't find available persistent volumes to bind, 1 node(s) had taints that the pod didn't tolerate.
    Warning  FailedScheduling  &lt;unknown&gt;  default-scheduler  0/2 nodes are available: 1 node(s) didn't find available persistent volumes to bind, 1 node(s) had taints that the pod didn't tolerate.
  </code></pre>
  
  <p>kubectl get pv: </p>
  
  <pre><code>NAME          CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                STORAGECLASS       REASON   AGE
  my-local-pv   2Gi      RWO            Retain           Available                        local-storage            3m59s
  </code></pre>
  
  <p>Please help me. Thanks in advance</p>