You can use Apsara File Storage NAS (NAS) volumes in Container Service for Kubernetes (ACK) clusters. This topic describes the use scenarios of NAS volumes and provides usage notes for NAS volumes.
A NAS file system is created and a mount target is added to the file system. To create a NAS file system and add a mount target, log on to the NAS console. The mount target of the NAS file system and your cluster are deployed in the same virtual private cloud (VPC).
The mount target is in the following format:
- Mount as statically provisioned volumes
- Mount as dynamically provisioned volumes
- Statically provisioned NAS volumes
NAS provides shared storage services. You can mount NAS file systems as statically provisioned volumes to meet the requirements of diverse scenarios.
- Dynamically provisioned NAS volumes
You can mount NAS file systems as dynamically provisioned volumes when you want to use multiple NAS subdirectories for different applications.
You can also mount NAS file systems as dynamically provisioned volumes when you use StatefulSets to deploy applications and want each pod to use a separate NAS volume.
How to mount NAS file systems
We recommend that you mount NAS file systems by using the following methods:
- Recommended volume plug-in
We recommend that you use FlexVolume to mount NAS file systems.
FlexVolume is installed by default when you create an ACK cluster in the console. You must make sure that FlexVolume is upgraded to the latest version. For more information, see Upgrade the components.
- How to mount NAS file systems
- Not recommended mounting methods
You can mount NAS file systems to ACK clusters only by using FlexVolume. The Network File System (NFS) driver provided by Kubernetes is not supported.
- NAS provides shared storage services. A persistent volume claim (PVC) that is used to mount a NAS file system can be shared among pods.
- Do not delete the mount target if the related NAS file system is still mounted. Otherwise, the operating system hang may occur.
- After a mount target is created, wait until the status of the mount target changes to Available.
- We recommend that you use NFSv3.
- We recommend that you upgrade FlexVolume to the latest version before you use NAS volumes.
- Extreme NAS file systems support only NFSv3. You must specify the
nolockparameter when you mount the file systems.