Reputation: 126
I need small persistent volumes of around 50 Mb for my pods/containers. I'm using gce persistent disks as persistent storage for google container engine but I can't create disks smaller than 1 GB
I've created the disk:
gcloud compute disks create disk2 --size=1 --zone=us-central1-a
and created volume and volume claim with kubectl from my yaml files.
What I have trouble understanding is the size in the volume.yaml: if I put a size bigger then 1Gi or a size smaller than 1Gi everything is working fine, so what is the purpose of size in a volume config. Also the describe pv has:
Source:
Type: GCEPersistentDisk (a Persistent Disk resource in Google Compute Engine)
PDName: disk1
FSType: ext4
Partition: 0
ReadOnly: false
Can I change the partition here and partition the disk into smaller chunks ? I couldn't find how to declare the partition number in volume.yaml
Upvotes: 1
Views: 471
Reputation: 1179
Google Cloud Platform doesn't support smaller sizes no matter what you do, unfortunately.
As for k8s side, no you can't partition the disk (a volume is supposed to be directly mountable, so GCE-PD provider gives you single volume back), and even then GCP doesn't support multiple writers to single volume, even if you have necessary support in kernel.
Upvotes: 1