Can I mount Google cloud storage bucket to a pod as a persistent disk. If yes how?

I have a gke cluster with nodes in 3 different Zones but same region. I want to use persistent disks to my pods. But the pods are created randomly in all the 3 zones.How can I use a gcePD (common for all the nodes). or Can I add the storage bucket in the pod deployment (Yaml) file. If it is podssible .kindly suggest me how to do it?


Solution 1:

Follow this github link. You need to install fuse in the image. Your container should be in previliged mode and you need to use lifecycle. https://github.com/maciekrb/gcs-fuse-sample