GithubHelp home page GithubHelp logo

dlunch / nfs-ganesha-server-and-external-provisioner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kubernetes-sigs/nfs-ganesha-server-and-external-provisioner

0.0 1.0 0.0 7.72 MB

NFS Ganesha Server and Volume Provisioner.

License: Apache License 2.0

Makefile 2.69% Go 90.85% Dockerfile 3.83% Shell 2.63%

nfs-ganesha-server-and-external-provisioner's Introduction

NFS Ganesha server and external provisioner

nfs-ganesha-server-and-external-provisioner is an out-of-tree dynamic provisioner for Kubernetes 1.14+. You can use it to quickly & easily deploy shared storage that works almost anywhere. Or it can help you write your own out-of-tree dynamic provisioner by serving as an example implementation of the requirements detailed in the proposal.

It works just like in-tree dynamic provisioners: a StorageClass object can specify an instance of nfs-ganesha-server-and-external-provisioner to be its provisioner like it specifies in-tree provisioners such as GCE or AWS. Then, the instance of nfs-ganesha-server-and-external-provisioner will watch for PersistentVolumeClaims that ask for the StorageClass and automatically create NFS-backed PersistentVolumes for them. For more information on how dynamic provisioning works, see the docs or this blog post.

Quickstart

Choose some volume for your nfs-ganesha-server-and-external-provisioner instance to store its state & data in and mount the volume at /export in deploy/kubernetes/deployment.yaml. It doesn't have to be a hostPath volume, it can e.g. be a PVC. Note that the volume must have a supported file system on it: any local filesystem on Linux is supported & NFS is not supported.

...
  volumeMounts:
    - name: export-volume
      mountPath: /export
volumes:
  - name: export-volume
    hostPath:
      path: /tmp/nfs-provisioner
...

Choose a provisioner name for a StorageClass to specify and set it in deploy/kubernetes/deployment.yaml

...
args:
  - "-provisioner=example.com/nfs"
...

Create the deployment.

$ kubectl create -f deploy/kubernetes/deployment.yaml
serviceaccount/nfs-provisioner created
service "nfs-provisioner" created
deployment "nfs-provisioner" created

Create ClusterRole, ClusterRoleBinding, Role and RoleBinding (this is necessary if you use RBAC authorization on your cluster, which is the default for newer kubernetes versions).

$ kubectl create -f deploy/kubernetes/rbac.yaml
clusterrole.rbac.authorization.k8s.io/nfs-provisioner-runner created
clusterrolebinding.rbac.authorization.k8s.io/run-nfs-provisioner created
role.rbac.authorization.k8s.io/leader-locking-nfs-provisioner created
rolebinding.rbac.authorization.k8s.io/leader-locking-nfs-provisioner created

Create a StorageClass named "example-nfs" with provisioner: example.com/nfs.

$ kubectl create -f deploy/kubernetes/class.yaml
storageclass "example-nfs" created

Create a PersistentVolumeClaim with annotation volume.beta.kubernetes.io/storage-class: "example-nfs"

$ kubectl create -f deploy/kubernetes/claim.yaml
persistentvolumeclaim "nfs" created

A PersistentVolume is provisioned for the PersistentVolumeClaim. Now the claim can be consumed by some pod(s) and the backing NFS storage read from or written to.

$ kubectl get pv
NAME                                       CAPACITY   ACCESSMODES   RECLAIMPOLICY   STATUS      CLAIM         REASON    AGE
pvc-dce84888-7a9d-11e6-b1ee-5254001e0c1b   1Mi        RWX           Delete          Bound       default/nfs             23s

Deleting the PersistentVolumeClaim will cause the provisioner to delete the PersistentVolume and its data.

Deleting the provisioner deployment will cause any outstanding PersistentVolumes to become unusable for as long as the provisioner is gone.

Running

To deploy nfs-ganesha-server-and-external-provisioner on a Kubernetes cluster see Deployment.

To use nfs-ganesha-server-and-external-provisioner once it is deployed see Usage.

Releases done here in external-storage will not have corresponding git tags (external-storage's git tags are reserved for versioning the library), so to keep track of releases check this README, the changelog, or Quay

Writing your own

Go here for an example of how to write your own out-of-tree dynamic provisioner.

Roadmap

The source code in this repository was migrated from kubernetes-incubator/external-storage. We are yet to complete the following migration tasks.

  • Update e2e tests
  • Automate building container images to the new registry
  • Update helm chart

This is still alpha/experimental and will change to reflect the out-of-tree dynamic provisioner proposal

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.

nfs-ganesha-server-and-external-provisioner's People

Contributors

afbjorklund avatar aisuko avatar aka-bo avatar ashishranjan738 avatar bertinatto avatar childsb avatar cofyc avatar cryptk avatar dlunch avatar hkolvenbach avatar hzxuzhonghu avatar ianchakeres avatar joaocc avatar jsafrane avatar k8s-ci-robot avatar kmova avatar kokhang avatar krzwalko avatar kvaps avatar lawrencedudley avatar liangxia avatar mr-linus avatar nikhita avatar samuelmanzer avatar spiffxp avatar steffen911 avatar thirdeyenick avatar uzuku avatar weherdh avatar wongma7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.