gluster / gluster-containers

Dockerfiles (CentOS, Fedora, Red Hat) for GlusterFS
https://github.com/gluster/gluster-containers/pkgs/container/gluster-containers
223 stars 135 forks source link

how can I use gluster-containers as Gluster PersistentVolume with gluster-server deployed in kubernetes? #106

Open imwower opened 6 years ago

imwower commented 6 years ago

hello, I deployed gluster server within kubernetes, and the pods work well, I can mount the gluster-volume in the gluster-client pod with docker image : gluster/glusterfs-client, here is the script within gluster-client:

  mkdir -p /mnt/glusterfs/
  #the gluster1 is one of the gluster server:
  mount -t glusterfs gluster1:/k8s-volume /mnt/glusterfs/
  touch /mnt/glusterfs/demo.txt

this works well. but how can I add Gluster PersistentVolume using this gluster-server? what's the Gluster Endpoint here?

phlogistonjohn commented 6 years ago

If you are using Kubernetes I highly recommend looking at the gluster-kubernetes project that does most of the hard work of deployment for you. This will set up gluster containers and the heketi server for dynamic provisioning. Similarly, if you are using openshift, look into the openshift-ansible deployment method. Once you have either one of these going you'll be able to create storageClasses and create PVCs that will handle the mounting for you.

If I am misunderstanding the question please feel free to correct me and elaborate on your situation. Thanks!