Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does rexray/csi-nfs work with kubernetes? #15

Open
rheng06 opened this issue Apr 27, 2018 · 4 comments
Open

does rexray/csi-nfs work with kubernetes? #15

rheng06 opened this issue Apr 27, 2018 · 4 comments

Comments

@rheng06
Copy link

rheng06 commented Apr 27, 2018

i was able to create the volume with docker. But now i want to use that volume in a kubernetes cluster.

[root@csi-nfs-node1 docker]# docker volume create -d rexray/csi-nfs -o host=xxxxxx -o export=/data csi-nfs-volume

[root@csi-nfs-node1 docker]# docker volume ls
DRIVER VOLUME NAME
rexray/csi-nfs:latest csi-nfs-volume

I created both a pv and pvc. I notice that kubernetes does not like the driver name rexray/csi-nfs, so i removed rexray.

When i go to launch my nginx pod, it can't mount the volume. Wondering if anyone else tried it.
Thanks..

apiVersion: v1
kind: PersistentVolume
metadata:
creationTimestamp: null
labels:
io.kompose.service: csi-data-volume
name: csi-data-volume
spec:
storageClassName: manual
capacity:
storage: 100Mi
accessModes:

  • ReadWriteOnce
    csi:
    driver: csi-vfs
    volumeHandle: csi-volume

apiVersion: v1
kind: PersistentVolume
metadata:
creationTimestamp: null
labels:
io.kompose.service: csi-data-volume
name: csi-data-volume
spec:
storageClassName: manual
capacity:
storage: 100Mi
accessModes:

  • ReadWriteOnce
    csi:
    driver: csi-vfs
    volumeHandle: csi-nfs-volume

apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:

  • name: nginx
    image: nginx:1.7.9
    ports:
    • containerPort: 80
      volumeMounts:
    • mountPath: "/work"
      name: data-volume
      volumes:
    • name: data-volume
      persistentVolumeClaim:
      claimName: csi-nfs-data-claim
      status: {}
@rheng06
Copy link
Author

rheng06 commented May 14, 2018

I notice that i'm trying to utilize a docker volume on kubernetes. So thats not going to work. I guess I'd like to know if its possible to create a volume using the rexray csi-nfs plugin. That volume is basically a nfs share that I exported from a remote server. I want to be able to mount that share to the pod/containers that I launch using kubernetes. I know i can specify the server name and path in my yaml file to make it work, but was wondering how i could do this with the rexray csi-nfs plugin.

  volumes:
    - name: nfs-client-root
      nfs:
        server: 10.10.40.100
        path: /share/nfs-share1

I was unsuccessful in trying to get things to work using the examples in the rexray website.

@clintkitson
Copy link
Member

Thoughts @codenrhoden ?

@rheng06
Copy link
Author

rheng06 commented May 15, 2018

These were the website i was referring to. Seems like rexray examples are only for Dockers. I haven't seen anything out there that shows the csi-nfs plugin work for kubernetes. The only way i got it to work was was creating a storageclass/persistantvolume with the above information.

Thanks for any help or guidance on this.

http://rexray.readthedocs.io/en/v0.10.1/user-guide/csi/#configuration
https://github.com/rexray/csi-nfs

@sanjeevshar
Copy link

Does anyone know of a csi-nfs plugin that works for kubernetes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants