This procedure shows how to create a Persistent Volume (PV) in your Kubernetes cluster to access your NFS shared storage.
Before you begin
This procedure requires the following items and configurations:
-
Kubernetes version 1.15.x or higher
-
Konvoy version 1.4.x or higher
-
NFS shared storage in your environment and accessible to your cluster
Create a Persistent Volume
Create a Persistent Volume using NFS as an example.
-
Create a file called
nfs-share.yaml
, similar to the example below.-
Choose a
name
for the persistent volume you want to create. In this example it isnfs-share
. -
Select the appropriate labels.
-
Enter the FQDN server name or IP address of the NFS server. In this example it is
192.168.86.252
. -
Enter the path to your NFS server volume. In this example it is
/volume1/nfs-01/nfs-share
.
-
-
Apply the file to create an NFS Persistent Volume (PV).
After that is deployed, validate that the status is available. You should receive a return value of
persistentvolume/nfs-share created.
-
Validate the PV is available.
Output, similar to this below, shows that the cluster has accepted your Persistent Volume and is in status available:
Your Persistent Volume is now available for use. Next, create a Persistent Volume Claim so your Pod can use the storage.
Related Information
For information on related topics or procedures, refer to the following: