<p>I am trying trying to use a persistent disk from GCE on a GKE project.</p>

<p>Here are the steps I used:</p>

<p>gcloud compute disks create --size 50GB XXX</p>

<p>And here is the response:</p>

<hr>

<p>WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: <a href="https://developers.google.com/compute/docs/disks#performance" rel="nofollow noreferrer">https://developers.google.com/compute/docs/disks#performance</a>.
Created [<a href="https://www.googleapis.com/compute/v1/projects/XXX/zones/us-central1-a/disks/DISKNAME]" rel="nofollow noreferrer">https://www.googleapis.com/compute/v1/projects/XXX/zones/us-central1-a/disks/DISKNAME]</a>.
NAME               ZONE           SIZE_GB  TYPE         STATUS
DISKNAME  us-central1-a  50       pd-standard  READY</p>

<p>New disks are unformatted. You must format and mount a disk before it
can be used. You can find instructions on how to do this at:</p>

<p><a href="https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting" rel="nofollow noreferrer">https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting</a></p>

<hr>

<p>Here is a sniped of my deployment file:</p>

<hr>

<p>volumeMounts:
        - mountPath: /data/db
          name: GKEDISK
        - mountPath: /data/configdb
          name: GKEDISK
      restartPolicy: Always
      volumes:
        - name: GKEDISK
          gcePersistentDisk:
            pdName: DISKNAME</p>

<h2>            fsType: ext4</h2>

<p>Questions:</p>

<p>1) Do I need to format the disk myself or will GKE do this for me based on the fsType I selected?</p>

<p>2) After I create the disk, I can see it on gcloud, but kubectl get persistentvolumes returns "No Resources Found". Are there any extra steps that need to be execute to allow for GKE to see the disk created on GCE?</p>

<p>If you go the manual route, you need to both create the disk in gcloud AND create PV in kubernetes.</p>

<p>Although, why not make use of the flexibility kube gives you with this cloud provider and stick with <a href="https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/" rel="nofollow noreferrer">dynamic PV provisioning</a> ? That way you just create a PVC and the volume/pv is created for you "magically".</p>
