10

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?

Ram
  • 261
  • 1
  • 2
  • 7
  • Have you tried mounting the Google Cloud storage bucket using the [Cloud Storage FUSE](https://cloud.google.com/storage/docs/gcs-fuse)?. I also find similar [queries](https://stackoverflow.com/questions/35966832/mount-google-storage-bucket-in-google-container) [here](https://stackoverflow.com/questions/35587737/can-i-mount-a-gcs-bucket-inside-kubernetes-pod) in the community, which says its possible. See if that helps you. – Digil Jan 13 '18 at 04:45

1 Answers1

6

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

DanielM
  • 137
  • 1
  • 7
Ram
  • 261
  • 1
  • 2
  • 7