<p>On GKE, I set a statefulset resource as</p>
<pre><code>---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: redis
spec:
  serviceName: &quot;redis&quot;
  selector:
    matchLabels:
      app: redis
  updateStrategy:
    type: RollingUpdate
  replicas: 3
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
      - name: redis
        image: redis
        resources:
          limits:
            memory: 2Gi
        ports:
          - containerPort: 6379
        volumeMounts:
          - name: redis-data
            mountPath: /usr/share/redis
      volumes:
        - name: redis-data
          persistentVolumeClaim:
            claimName: redis-data-pvc
</code></pre>
<p>Want to use pvc so created this one. (This step was did before the statefulset deployment)</p>
<pre><code>---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: redis-data-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
</code></pre>
<p>When check the resource in kubernetes</p>
<pre><code>kubectl get pvc
NAME             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
redis-data-pvc   Bound    pvc-6163d1f8-fb3d-44ac-a91f-edef1452b3b9   10Gi       RWO            standard       132m
</code></pre>
<p>The default Storage Class is <code>standard</code>.</p>
<pre><code>kubectl get storageclass
NAME                 PROVISIONER
standard (default)   kubernetes.io/gce-pd
</code></pre>
<p>But when check the statafulset's deployment status. It always wrong.</p>
<pre><code># Describe its pod details
...
Events:
  Type     Reason                  Age                From                     Message
  ----     ------                  ----               ----                     -------
  Warning  FailedScheduling        22s                default-scheduler        persistentvolumeclaim &quot;redis-data-pvc&quot; not found
  Warning  FailedScheduling        17s (x2 over 20s)  default-scheduler        pod has unbound immediate PersistentVolumeClaims (repeated 2 times)
  Normal   Created                 2s (x2 over 3s)    kubelet                  Created container redis
  Normal   Started                 2s (x2 over 3s)    kubelet                  Started container redis
  Warning  BackOff                 0s (x2 over 1s)    kubelet                  Back-off restarting failed container
</code></pre>
<p>Why can't it find the <code>redis-data-pvc</code> name?</p>

iooi
<p>What you have done, should work. Make sure that the <code>PersistentVolumeClaim</code> and the <code>StatefulSet</code> is located in the same namespace.</p>
<hr />
<p>Thats said, this is an easier solution, and that let you easier scale up to more replicas:</p>
<p>When using StatefulSet and PersistentVolumeClaim, use the <code>volumeClaimTemplates:</code> field in the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#components" rel="noreferrer">StatefulSet</a> instead.</p>
<p>The <code>volumeClaimTemplates:</code> will be used to create unique PVCs for each replica, and they have unique naming ending with e.g. <code>-0</code> where the number is an <em>ordinal</em> used for the replicas in a StatefulSet.</p>
<p>So instead, use a SatefuleSet manifest like this:</p>
<pre><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: redis
spec:
  serviceName: &quot;redis&quot;
  selector:
    matchLabels:
      app: redis
  updateStrategy:
    type: RollingUpdate
  replicas: 3
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
      - name: redis
        image: redis
        resources:
          limits:
            memory: 2Gi
        ports:
          - containerPort: 6379
        volumeMounts:
          - name: redis-data
            mountPath: /usr/share/redis
  volumeClaimTemplates:                     // this will be used to create PVC
  - metadata:
      name: redis-data
    spec:
      accessModes: [ &quot;ReadWriteOnce&quot; ]
      resources:
        requests:
          storage: 10Gi
</code></pre>
