简体   繁体   中英

kubernetes PersistentVolume over google cloud storage bucket

I have created a persistent volume claim where I will store some ml model weights as follows:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: models-storage
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: model-storage-bucket
  resources:
    requests:
      storage: 8Gi

However this configuration will provision a disk on a compute engine, and it is a bit cumbersome to copy stuff there and to upload/update any data. Would be so much more convenient if I could create a PersistentVolume abstracting a google cloud storage bucket. However, I couldn't find anywhere including the google documentation a way to do this. I am baffled because I would expect this to be a very common use case. Anyone knows how I can do that? I was expecting to find something along the lines of

apiVersion: v1
kind: PersistentVolume
metadata:
  name: test-volume
spec:
  storageBucketPersistentDisk:
    pdName: gs://my-gs-bucket

To mount cloud storage bucket you need to install Google Cloud Storage driver ( NOT the persistent disk nor file store) on your cluster, create the StorageClass and then provision the bucket backed storage either dynamically or static; just as you would like using persistent disk or file store csi driver. Checkout the link for detailed steps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM