9

Since NFS has single point of failure issue. I am thinking to build a storage layer using S3 or Google Cloud Storage as PersistentVolumn in my local k8s cluster.

After a lot of google search, I still cannot find an way. I have tried using s3 fuse to mount volume to local, and then create PV by specifying the hotPath. However, a lot of my pods (for example airflow, jenkins), complained about no write permission, or say "version being changed".

Could someone help figuring out the right way to mount S3 or GCS bucket as a PersistenVolumn from local cluster without using AWS, or GCP.

jwpublic
  • 93
  • 1
  • 1
  • 4
  • Does this answer your question? [How to mount S3 bucket on Kubernetes container/pods?](https://stackoverflow.com/questions/51673011/how-to-mount-s3-bucket-on-kubernetes-container-pods) – Emruz Hossain Jul 14 '21 at 03:27
  • I'd reckon you can also take a look on this guide: https://pliutau.com/mount-gcs-bucket-k8s/ – Dawid Kruk Jul 14 '21 at 13:27

1 Answers1

3

S3 is not a file system and is not intended to be used in this way.

I do not recommend to use S3 this way, because in my experience any FUSE-drivers very unstable and with I/O operations you will easily ruin you mounted disk and stuck in Transport endpoint is not connected nightmare for you and your infrastructure users. It's also may lead to high CPU usage and RAM leakage.

Useful crosslinks:

lucidyan
  • 3,575
  • 2
  • 22
  • 24