I have a GCE persistent disk formatted with a default partition. When I mount the disk to a VM, I use the device /dev/sdb1, for example.
Now I want to mount the same persistent disk to GKE. The docs page "Using preexisting Persistent Disks as PersistentVolumes" says to use the following yaml to configure your disk:
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-demo
spec:
storageClassName: ""
capacity:
storage: 500G
accessModes:
- ReadWriteOnce
gcePersistentDisk:
pdName: pd-name
fsType: ext4
However, I can't find where to specify the partition to be mounted.
How do I request GKE to mount partition 1, instead of the "bare" disk with no partitions? Or do I have to reformat my disk so that it has no partitions?