<p>I'm starting with GKE (and kubernetes in general) and I want to mount a persistent volume on a pod using a gcePersistentDisk.</p>

<p>I first created a Persistent Disk (project-data) in Compute Engine, then created a PersistentVolume and a PersistentVolumeClaim like so:</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: project-data
spec:
  storageClassName: standard
  capacity:
    storage: 20G
  accessModes:
    - ReadWriteOnce
  gcePersistentDisk:
    pdName: project-data
    fsType: ext4
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: project-data-claim
spec:
  storageClassName: standard
  volumeName: project-data
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20G
  selector:
    matchLabels:
      app: myapp
</code></pre>

<p>After applying this config, I see in GKE/Storage that my PVC is "Bound", but I can't find a way to access my volume in myapp.</p>

<p>I tried to edit the deployment yaml in the console by adding:</p>

<pre><code>volumeMounts:
- mountPath: /data
  name: project-data
</code></pre>

<p>...but this modification is refused by the console (it seems that this kind of edit is forbidden).</p>

<p>How can I finally see my PersistentVolume as a filesystem in my app?</p>

SuperPython
<p>First of all, PVC should be defined in the volumes section:</p>

<pre><code>volumes:
- name: project-data
  persistentVolumeClaim: 
    claimName: project-data-claim
</code></pre>

<p>And if it's refuesed to edit the pod directly, you can edit the yaml file, then apply it:</p>

<pre><code>$ kubectl apply -f your.yaml
</code></pre>

<p>Also, since you have the <code>selector</code> defined in your pvc configuration, I think you should have <code>label</code> defined in your pv configuration.</p>
