In this section, you can learn about Network File System (NFS) node management and setting up a static persistent volume resource in NFS. This section refers to native clusters only.
VMware Cloud Director Container Service Extension can automatically add NFS nodes to the Kubernetes configuration when creating a new cluster. Cluster administrators can use the NFS nodes to implement static persistent volumes, which allows the deployment of stateful applications.
Static persistent volumes are pre-provisioned by the cluster administrator. They carry the details of the real storage that is available for use by cluster users. They exist in the Kubernetes API and are available for consumption. Users can allocate a static persistent volume by creating a persistent volume claim that requires the same or less storage. VMware Cloud Director Container Service Extension supports static volumes hosted on NFS. For more information, refer to Static persistent volumes.
NFS Volume Architecture
A NFS volume allows an existing NFS share to be mounted into one or more pods. When one or more pods are removed, the contents of the NFS volume are preserved and the volume is merely unmounted. This means that an NFS volume can be pre-populated with data, and that data can be distributed between pods. NFS can be mounted by multiple writers simultaneously.
To use NFS volumes, it is necessary to have an NFS server running with the shares exported. VMware Cloud Director Container Service Extension provides commands to add pre-configured NFS servers to any cluster.
Create a cluster with an Attached NFS node
Follow these steps to create an Ubuntu based cluster and provision an attached NFS node.
Procedure
Set Up NFS Shares
Follow these steps to create NFS shares that you can allocate through persistent volume resources.
Procedure
Results
The exportable NFS shares are prepared and you can logout of the NFS node.
What to do next
Once the exportable NFS shares are prepared, you can continue to create persistent volume resources.
Using Kubernetes Persistent Volumes
To use NFS shares, it is necessary to create persistent volume resources. To create these resources, complete the following steps.
Procedure
Check the operational health of an application
You can check the operational health of a deployed application and its storage.
Procedure
Frequently Asked Questions
In this section, you can see the frequently asked questions users have for NFS management and the available solutions.
Question | Solution |
---|---|
What is the difference between a persistent volume (PV) and persistent volume claim (PVC)? | A persistent volume is ready-to-use storage space created by the cluster admin. VMware Cloud Director Container Service Extension currently only supports static persistent volumes. A persistent volume claim is the storage requirement specified by the user. Kubernetes dynamically binds/unbinds the PVC to PV at runtime. For more information, refer to the Kubernetes website. |
How are NFS exports mounted to containers? | Once the cluster administrator creates a persistent volume backed by NFS, Kubernetes mounts the specified NFS export to pods and the containers they run. |
What happens to storage when a Kubernetes application terminates? | Kubernetes returns the persistent volume and its claim to the pool. The data from the application remains on the volume. It can be cleaned up manually by logging into the NFS node VM and deleting files. |