Go to file
Mathusan Selvarajah 7e584f4972 add instructions on how to run e2e tests 2019-04-23 15:43:27 -04:00
cmd/nfsplugin add e2e test files 2019-04-23 15:43:21 -04:00
deploy/kubernetes Update deployment files and Dockerfile 2019-02-07 19:53:29 +05:30
examples/kubernetes Move nfs csi-driver to its own repo 'csi-driver-nfs' 2019-02-07 14:48:27 +05:30
pkg/nfs update nfs driver for kube 1.14 2019-04-23 15:43:27 -04:00
release-tools Add 'release-tools/' from commit '33d58fdc29b90120bf16e536042379251f8631f2' 2019-02-20 08:59:57 +01:00
test add e2e test files 2019-04-23 15:43:21 -04:00
vendor update vendor files to kube 1.14 2019-04-23 15:42:44 -04:00
.gitignore switch to csi-release-tools 2019-02-20 09:10:47 +01:00
.travis.yml switch to csi-release-tools 2019-02-20 09:10:47 +01:00
CONTRIBUTING.md Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00
Dockerfile switch to csi-release-tools 2019-02-20 09:10:47 +01:00
Gopkg.lock update vendor files to kube 1.14 2019-04-23 15:42:44 -04:00
Gopkg.toml update vendor files to kube 1.14 2019-04-23 15:42:44 -04:00
LICENSE Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00
Makefile switch to csi-release-tools 2019-02-20 09:10:47 +01:00
OWNERS add msau42 to approvers 2019-02-20 13:29:05 -08:00
README.md add instructions on how to run e2e tests 2019-04-23 15:43:27 -04:00
RELEASE.md Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00
SECURITY_CONTACTS Update OWNERS and SECURITY_CONTACTS 2018-09-18 11:52:04 -07:00
code-of-conduct.md Initial commit from kubernetes-template-project 2018-09-18 11:51:05 -07:00

README.md

CSI NFS driver

Kubernetes

Requirements

The folllowing feature gates and runtime config have to be enabled to deploy the driver

FEATURE_GATES=CSIPersistentVolume=true,MountPropagation=true
RUNTIME_CONFIG="storage.k8s.io/v1alpha1=true"

Mountprogpation requries support for privileged containers. So, make sure privileged containers are enabled in the cluster.

Example local-up-cluster.sh

ALLOW_PRIVILEGED=true FEATURE_GATES=CSIPersistentVolume=true,MountPropagation=true RUNTIME_CONFIG="storage.k8s.io/v1alpha1=true" LOG_LEVEL=5 hack/local-up-cluster.sh

Deploy

kubectl -f deploy/kubernetes create

Example Nginx application

Please update the NFS Server & share information in nginx.yaml file.

kubectl -f examples/kubernetes/nginx.yaml create

Using CSC tool

Build nfsplugin

$ make nfs

Start NFS driver

$ sudo ./_output/nfsplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5

Test

Get csc tool from https://github.com/rexray/gocsi/tree/master/csc

Get plugin info

$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
"NFS"	"0.1.0"

NodePublish a volume

$ export NFS_SERVER="Your Server IP (Ex: 10.10.10.10)"
$ export NFS_SHARE="Your NFS share"
$ csc node publish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/nfs --attrib server=$NFS_SERVER --attrib share=$NFS_SHARE nfstestvol
nfstestvol

NodeUnpublish a volume

$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/nfs nfstestvol
nfstestvol

Get NodeID

$ csc node get-id --endpoint tcp://127.0.0.1:10000
CSINode

Running Kubernetes End To End tests on the NFS Driver

  1. Stand up a local cluster ALLOW_PRIVILEGED=1 hack/local-up-cluster.sh
  2. Build the nfs driver by running make
  3. Create NFS Driver Image, where the image tag would be whatever that is required by your YAML deployment files docker build -t quay.io/k8scsi/nfsplugin:v1.0.0 .
  4. Run E2E Tests using the following command: go test -v ./cmd/nfsplugin/ -ginkgo.v -ginkgo.progress --kubeconfig=/var/run/kubernetes/admin.kubeconfig -timeout=0

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.