This Terraform module deploys the helm chart nfs-subdir-external-provisioner that used to be known as nfs-client-provisioner.
NFS subdir external provisioner is an automatic provisioner that use your existing and already configured NFS server to support dynamic provisioning of Kubernetes Persistent Volumes via Persistent Volume Claims. Persistent volumes are provisioned as ${namespace}-${pvcName}-${pvName}.
The module makes use of the Helm Provider which looks for Kubernetes configuration in the following location "~/.kube/config"
-
Create a new directory
mkdir example-deployment
-
Change into the directory
cd example-deployment
-
Create a file for the configuration code
touch main.tf
-
Paste the following configuration into
main.tf
and save it. Make sure you update the nfs_server/nfs_server_path values to match your NFS server. You can change some of the other values defined in variables.tf too.module "nfs-client-provisioner" { source = "github.com/sculley/terraform-nfs-client-provisioner" nfs_server = "192.168.122.1" nfs_server_path = "/mnt/nfs_shares/kubernetes" }
-
Run terraform init
terraform init
-
Run terraform plan
terraform plan
-
Apply the Terraform configuration
terraform apply
Name | Version |
---|---|
terraform | >= 0.15.0 |
helm | 2.7.0 |
kubectl | 1.14.0 |
kubernetes | 2.13.1 |
Name | Version |
---|---|
helm | 2.7.0 |
kubectl | 1.14.0 |
kubernetes | 2.13.1 |
Name | Source | Version |
---|---|---|
metrics_server | git::https://gitlab.com/novatiq/ops/terraform/modules/terraform-aws-metrics-server-k8s.git | v0.0.4 |
nfs-client-provisioner | /Users/sculley/Terraform/Modules/terraform-kubernetes-nfs-client-provisioner | n/a |
sftp | git::https://gitlab.com/novatiq/ops/terraform/modules/terraform-all-sftp-k8s.git | v0.0.3 |
Name | Type |
---|---|
helm_release.kubelet_rubber_stamp | resource |
helm_release.metallb | resource |
kubectl_manifest.ip_address_pool | resource |
kubectl_manifest.l2_advertisement | resource |
kubernetes_namespace.metallb | resource |
kubernetes_namespace.this | resource |
kubernetes_persistent_volume_claim.data_volume | resource |
kubernetes_persistent_volume_claim.logs_volume | resource |
kubernetes_secret.gitlab_registry | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
environment | n/a | any |
n/a | yes |
kubernetes_client_certificate | n/a | any |
n/a | yes |
kubernetes_client_key | n/a | any |
n/a | yes |
kubernetes_cluster_ca_certificate | n/a | any |
n/a | yes |
kubernetes_cluster_name | n/a | any |
n/a | yes |
kubernetes_host | n/a | any |
n/a | yes |
metallb_helm_chart_version | n/a | any |
n/a | yes |
metallb_ip_address_pool_range | n/a | any |
n/a | yes |
metrics_server_helm_chart_version | n/a | any |
n/a | yes |
namespace | n/a | any |
n/a | yes |
nfs_mount_options | n/a | any |
n/a | yes |
novatiq_gitlab_registry_token | n/a | any |
n/a | yes |
project_name | n/a | any |
n/a | yes |
sftp_helm_chart_version | n/a | any |
n/a | yes |
sftp_user_ssh_key | n/a | any |
n/a | yes |
sftp_user_ssh_key_mount_path | n/a | any |
n/a | yes |
sftp_users_conf | n/a | any |
n/a | yes |
No outputs.