I am trying trying to use a persistent disk from GCE on a GKE project.
Here are the steps I used:
gcloud compute disks create --size 50GB XXX
And here is the response:
WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance. Created [https://www.googleapis.com/compute/v1/projects/XXX/zones/us-central1-a/disks/DISKNAME]. NAME ZONE SIZE_GB TYPE STATUS DISKNAME us-central1-a 50 pd-standard READY
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:
https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting
Here is a sniped of my deployment file:
volumeMounts: - mountPath: /data/db name: GKEDISK - mountPath: /data/configdb name: GKEDISK restartPolicy: Always volumes: - name: GKEDISK gcePersistentDisk: pdName: DISKNAME
fsType: ext4
Questions:
1) Do I need to format the disk myself or will GKE do this for me based on the fsType I selected?
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?