rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 403 forks source link

GlusterFS Support #500

Open FreekingDean opened 4 years ago

FreekingDean commented 4 years ago

Is your feature request related to a problem? Please describe. I have an existing GlusterFS storage cluster I'd like to mount using the native kubernetes tooling.

Describe the solution you'd like GlusterFS volume driver support.

Describe alternatives you've considered Looking at SMB/CFIS & NFS mounts. But I think mounting using glusters native storage driver would be better?

Additional context Add any other context or screenshots about the feature request here.

FreekingDean commented 4 years ago

Here is the example I am following: https://github.com/kubernetes/examples/tree/master/volumes/glusterfs

Heres my actual code Im applying to a k3os cluster

apiVersion: v1
kind: Service
metadata:
  name: glusterfs-cluster
spec:
  ports:
  - port: 1
---
apiVersion: v1
kind: Endpoints
metadata:
  name: glusterfs-cluster
subsets:
- addresses:
  - ip: [node1]
  ports:
  - port: 1
- addresses:
  - ip: [node2]
  ports:
  - port: 1
- addresses:
  - ip: [node3]
  ports:
  - port: 1
---
apiVersion: v1
kind: Pod
metadata:
  name: glusterfs
spec:
  containers:
  - name: glusterfs
    image: nginx
    volumeMounts:
    - mountPath: "/mnt/glusterfs"
      name: glusterfsvol
  volumes:
  - name: glusterfsvol
    glusterfs:
      endpoints: glusterfs-cluster
      path: kube_vol
      readOnly: true

This is the error I see from kubectl describe pod glusterfs

failed to get Plugin from volumeSpec for volume "glusterfsvol" err=no volume plugin matched
FreekingDean commented 4 years ago

After doing some digging, it looks like this may not be possible on alpine (right now): https://github.com/gluster/glusterfs/issues/268

ChristophDietrich commented 4 years ago

Run into the same issue, any ideas for a solutions on this topic? Will donate also for this feature to have GlusterFS Support.

FreekingDean commented 4 years ago

After further investigation it looks like k3s doesn't support GlusterFS https://github.com/rancher/k3s/issues?q=is%3Aissue+is%3Aopen+gluster I ended up just using NFS :(

ChristophDietrich commented 4 years ago

I now use as GlusterFS cluster and export the volumes with NFS, but have all needed things of gluster:

https://www.server-world.info/en/note?os=Ubuntu_18.04&p=glusterfs&f=8

schmitch commented 4 years ago

btw. glusterfs for k8s is more or less dead. glusterfs-kubernetes is archved and heketi is maintenance only mode. You should look into kadalu which builds upon glusterfs.

FlexibleToast commented 3 years ago

GlusterFS for k8s is not dead, it has come back as kadalu. Kadalu is made by the Gluster developers and is very active.