nfs-provisioner
by Helm
A Chart to enable provisioning of NFS volumes under Kubernetes.
About this chart
NFS Provisioner
The NFS Provisioner is a dynamic provisioner for Kubernetes 1.4. You can use it to quickly & easily deploy shared storage that works almost anywhere.
It's based on the version by @ekozan, which can be found here: https://github.com/ekozan/charts/tree/nfs-provisioner/incubator/nfs-provisioner
Prerequisites Details
- Kubernetes 1.4 with alpha APIs enabled
Chart Details
This chart will do the following:
- Setup a functional nfs provisioner
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add cloudposse-incubator https://charts.cloudposse.com/incubator
$ helm install --name my-release cloudposse-incubator/nfs-provisioner
Configuration
The following tables lists the configurable parameters of the etcd chart and their default values.
| Parameter | Description | Default |
|---|---|---|
image | Container image name | quay.io/kubernetes_incubator/nfs-provisioner |
imageTag | Container image tag | v1.0.1 |
provisionerName | Provisoner Name | cluster.local/nfs |
storageClass | The provisioner storage Class | local-nfs |
defaultClass | Set-up as default class | false |
serviceIp | Setup the service ip | `` |
persistence.storageClass | Storage class of backing PVC | generic |
Specify each parameter using the --set key=value[,key=value] argument to helm install.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
$ helm install --name my-release -f values.yaml incubator/nfs-provisioner
Tip: You can use the default values.yaml
Consume nfs volumes
Create PVC resource with correct storage class
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: nfs-volume
annotations:
volume.beta.kubernetes.io/storage-class: "local-nfs"
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
and attach it to pod as usual PVC
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: app
spec:
replicas: 1
template:
spec:
containers:
- name: some-app
image: "nginx:alpine"
volumeMounts:
- mountPath: /var/www/html
name: nfs-pvc
volumes:
- name: nfs-pvc
persistentVolumeClaim:
claimName: nfs-volume
Deploy nfs-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-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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnfs-provisioner is pinned at v0.2.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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