Provision clusters with persistent NFS volumes
Kubernetes integration with the NFS driver is enabled by default, and the driver is installed in each cluster.InfoTo provision persistent NFS volumes, ensure that a Managed Kubernetes cluster and File Share are created in the same project and connected to the same network and subnetwork.
Step 1. Create a Managed Kubernetes cluster
Create a cluster by following the instructions from our guide: Create a Managed Kubernetes cluster. If you already have a Kubernetes cluster created, proceed to the next step.Step 2. Create a file share
Create a File Share in the same project and region as your Kubernetes cluster: 1. In the Gcore Customer Portal, navigate to Storage > File Shares. 2. Click Create File Share.
- Basic settings : Enter the name of the File Share and specify its size and protocol.
- File Share network settings : Select the private network and subnetwork that you will use for file sharing. Ensure that they match those selected in your Kubernetes cluster.
- Access : Click the Add rule button and specify the IP addresses of machines that should have access to the File Share, along with their access modes.
- (optional) Add tags : Add metadata to your File Share.
Step 3. Validate persistent NFS volume configuration
Run the following command to retrieve information about the storage classes configured in your Kubernetes cluster:gcore-nfs-*
storage class should be listed among other storage classes.
Resizing file share
InfoIf you want to change the size of the attached file share, you first need to unmount it and then mount it again inside your Kubernetes cluster. If you resize the attached File Share without unmounting it first, your applications will not work correctly.