Deploying Dynamic NFS Provisioning in Kubernetes - Exxact

blog.exxactcorp.com
6 min read
fairly difficult
The following documentation is intended to explain the procedure for deploying Dynamic NFS Provisioning in Kubernetes. Read our blog to learn more!
The following documentation is intended to explain the procedure for deploying Dynamic NFS Provisioning in Kubernetes.

Dynamic NFS Provisioning: is allows storage volumes to be created on-demand. The dynamic provisioning feature eliminates the need for cluster administrators to pre-provision storage. Instead, it automatically provisions storage when it is requested by users.

Pre-Requisites for Dynamic NFS Provisioning in Kubernetes.

Linux Work Station

K8 Cluster with no other load balancer installed

Kubernetes-cli or kubectl program

Kubernetes version v1.15.1 (any version should work)

Routable IP network with DHCP configured

Helm Package Manager installed

Tiller Service Running For a tutorial on Building a K8s Cluster using Vagrant visit: Building a Kubernetes Cluster using Vagrant

For a tutorial on Installing Helm Package Manager (Tiller) visit: Deploying Helm (Package Manager) in Kubernetes.

Step 1) Installing the NFS Server

In this particular example we'll allocate a local filesystem from which PersistenceVolume Claims can be made. We'll first create "/srv/nfs/kubedata"

[vagrant@kmaster ~]$ sudo mkdir /srv/nfs/kubedata -p

Change the ownership to "nfsnobody" [vagrant@kmaster ~]$ sudo chown nfsnobody: /srv/nfs/kubedata/

Next install the nfs-utils. This exanple is for centos 7 vagrant@kmaster ~]$ sudo yum install -y nfs-utils

Next, enable and start the userspace nfs server using systemctl. [vagrant@kmaster ~]$ sudo systemctl enable nfs-server Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service. [vagrant@kmaster ~]$ sudo systemctl start nfs-server [vagrant@kmaster ~]$ sudo systemctl status nfs-server ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) Active: active (exited) since Sat 2019-11-02 22:06:49 UTC; 12s ago

Next, we need to edit the exports file to add the file system we…
Exxact Corporation
Read full article