1. Enter the following command:

    2. Enter the command below, which sets the directory used for storage, along with user access rights. Modify the command if you’d like to keep storage at a different directory.

        • The -p /nfs parameter creates a directory named nfs at root.
        • The parameter allows all access to the storage directory.
      1. Create an NFS exports table. This table sets the directory paths on your NFS server that are exposed to the nodes that will use the server for storage.

        1. Open /etc/exports using your text editor of choice.
        2. Add the path of the /nfs folder that you created in step 3, along with the IP addresses of your cluster nodes. Add an entry for each IP address in your cluster. Follow each address and its accompanying parameters with a single space that is a delimiter.

      2. Open the ports used by NFS.

        1. To find out what ports NFS is using, enter the following command:

        2. that the previous command outputs. For example, the following command opens port 2049:

          1. sudo ufw allow 2049

      Within Rancher, add the NFS server as a storage volume and/or storage class. After adding the server, you can use it for storage for your deployments.