Storage ReadWriteMany in Google Kubernetes Engine

99封情书 提交于 2020-01-04 01:41:46

问题


Is there a way to be able to provide ReadWriteMany storage without having to implement a storage cluster?

I was able to provide storage with gcsfuse but it is really slow. I need something close to the speed of GlusterFS.

I am currently using GlusterFS.


回答1:


Another option: Google Cloud Platform recently started offering a hosted NFS service called Cloud Firestore.

Note that as of this writing, Cloud Firestore is still in Beta.

Here's the description:

Use Cloud Filestore to create fully managed NFS file servers on Google Cloud Platform (GCP) for use with applications running on Compute Engine virtual machines (VMs) instances or Kubernetes Engine clusters.

Create and manage Cloud Filestore instances by using the GCP console or the gcloud command-line tool, and interact with the NFS fileshare on the instance by using standard operating system commands.




回答2:


You could create an NFS server, and then mount the storage from the server to your nodes/pods. This supports ReadWriteMany as you require. I'm unsure if it's faster or slower than GlusterFS, although this suggests it is faster (with async i.e. the default settings).

You would first need to create an NFS server to provide the storage. The easiest way to do this is to launch a single node file server. There is a 'click to deploy' option for simplicity that you can navigate to from this page.

The shared storage on the NFS server must be exported on the machine before the nodes in the cluster can access it. SSH into the machine, and edit the /etc/exports file, adding an entry with the IP addresses that require access to the machines storage. Once the /etc/exports file has been configured, you need to restart the nfs service:

sudo systemctl restart nfs-kernel-server.service

There is a good example here of incorporating the NFS server with Kubernetes pods/nodes.



来源:https://stackoverflow.com/questions/47535535/storage-readwritemany-in-google-kubernetes-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!