Giter VIP home page Giter VIP logo

nfs-client-provisioner's Introduction

nfs-client-provisioner

Taken from https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client

Kubernetes NFS-Client Provisioner

Docker Repository on Quay

nfs-client is an automatic provisioner that used your already configured NFS server, automatically creating Persistent Volumes.

  • Persistent volumes are provisioned as ${namespace}-${pvcName}-${pvName}

How to deploy nfs-client to your cluster.

To note, you must already have an NFS Server.

  1. Editing:

Modify deploy.yaml and change the values to your own NFS server:

          env:
            - name: PROVISIONER_NAME
              value: fuseim.pri/ifs
            - name: NFS_SERVER
              value: 10.10.10.60
            - name: NFS_PATH
              value: /ifs/kubernetes
      volumes:
        - name: nfs-client-root
          nfs:
            server: 10.10.10.60
            path: /ifs/kubernetes

Modify deploy.yaml to match the same value indicated by PROVISIONER_NAME:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: managed-nfs-storage
provisioner: fuseim.pri/ifs # or choose another name, must match deployment's env PROVISIONER_NAME'
parameters:
  archiveOnDelete: "false" # When set to "false" your PVs will not be archived by the provisioner upon deletion of the PVC.
  1. Authorization

If your cluster has RBAC enabled, you must authorize the provisioner. If you are in a namespace/project other than "default" either edit auth.yaml.

Kubernetes:

$ kubectl create -f auth.yaml 
serviceaccount "nfs-client-provisioner" created
clusterrole "nfs-client-provisioner-runner" created
clusterrolebinding "run-nfs-client-provisioner" created
  1. Finally, test your environment!

Now we'll test your NFS provisioner.

Deploy:

$ kubectl create -f test/test.yaml

Now check your NFS Server for the file SUCCESS.

kubectl delete -f test.yaml

Now check the folder has been deleted.

  1. Deploying your own PersistentVolumeClaim

To deploy your own PVC, make sure that you have the correct storage-class as indicated by your deploy.yaml file.

For example:

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: test-claim
  annotations:
    volume.beta.kubernetes.io/storage-class: "managed-nfs-storage"
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Mi

nfs-client-provisioner's People

Contributors

funky81 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.