nfs-client-provisioner

by rimusz

Helm chartv0.1.6App v3.1.0-k8s1.11

nfs-client-provisioner is an automatic provisioner creating Persistent Volumes from the NFS

About this chart

NFS Client Provisioner

NFS Client Provisioner is an automatic provisioner that uses your already configured NFS server to automatically create Persistent Volumes.

TL;DR;

$ helm install rimusz/nfs-client-provisioner --set nfs.server="1.2.3.4"

Introduction

This chart bootstraps a nfs-client-provisioner deployment on a Kubernetes cluster using the Helm package manager.

Installing the Chart

To install the chart with the release name nfs:

$ helm install rimusz/nfs-client-provisioner --name nfs --set nfs.server="1.2.3.4"

The command deploys nfs-client-provisioner on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Testing the Chart

Now we'll test your NFS provisioner.

Deploy:

$ kubectl create -f test/test-claim.yaml -f test/test-pod.yaml

Now check in PVC folder on your NFS Server for the file SUCCESS.

Delete:

kubectl delete -f test/test-pod.yaml -f test/test-claim.yaml

Now check that PVC folder got renamed to archived-???.

Deploying your own PersistentVolumeClaim

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

For example:

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

Uninstalling the Chart

To uninstall/delete the nfs deployment:

$ helm delete nfs

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the kibana chart and their default values.

ParameterDescriptionDefault
image.repositoryThe image repository to pull fromquay.io/kubernetes_incubator/nfs-client-provisioner
image.tagThe image tag to pull fromv2.1.0-k8s1.10
image.pullPolicyImage pull policyIfNotPresent
nfs.serverNFS server IP``
nfs.pathNFS server share path/vol1
storageClass.createEnable creation of a StorageClass to consume this nfs-client-provisioner instancetrue
storageClass.defaultSet this StorageClass as the defaultfalse
storageClass.nameThe name to assign the created StorageClassnfs
storageClass.reclaimPolicySet the reclaimPolicy for PV within StorageClassDelete
rbac.createEnable RBACfalse
rbac.serviceAccountNameService account namedefault
resourcesResource limits for nfs-client-provisioner pod{}
nodeSelectorMap of node labels for pod assignment{}
tolerationsList of node taints to tolerate[]
affinityMap of node/pod affinities{}
$ helm install rimusz/nfs-client-provisioner --name nfs \
  --set nfs.server="1.2.3.4",resources.limits.cpu=200m

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install rimusz/nfs-client-provisioner --name nfs -f values.yaml

Tip: You can use the default values.yaml as an example

Deploy nfs-client-provisioner with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nfs-client-provisioner on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnfs-client-provisioner is pinned at v0.1.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply