This topic describes the recommended methods that you can use to mount NAS file systems on Container Service for Kubernetes (ACK). You can mount file systems by using storage plug-ins such as FlexVolume and Container Storage Interface (CSI). You can also mount file systems on Windows containers.

Notice We recommend that you mount a NAS file system by using one of the following methods. If you mount a NAS file system by using other methods, the file system may be exposed to stability risks. The NAS technical team cannot estimate the impact of these risks. You are solely responsible for all the losses and consequences that may arise from the risks.

Storage plug-ins

ACK supports FlexVolume and CSI. FlexVolume and CSI support multiple storage services such as Apsara File Storage NAS, Cloud Paralleled File System (CPFS), Object Storage Service (OSS), and Block Storage. FlexVolume and CSI provide flexible parameters to improve user experience and reduce O&M complexity.

We recommend that you use FlexVolume or CSI if you want to mount file systems on ACK clusters or self-managed Kubernetes clusters. Take note of the following items:
  • If you want to mount a file system on a Kubernetes cluster that is newly created, we recommend that you use CSI.
  • If you want to mount a file system on an existing Kubernetes cluster, we recommend that you use a storage plug-in that is already installed.
  • You cannot use both plug-ins on the same ACK cluster.
  • You cannot change the plug-in from FlexVolume to CSI for an ACK cluster.

For information about the differences between FlexVolume and CSI, see Differences between the CSI and FlexVolume plug-ins.

Use CSI to mount file systems

For information about how to mount file systems by using CSI, see NAS volume overview.

CSI supports the following methods: For more information, see Install and upgrade the CSI plug-in, Set quotas on the subdirectories of NAS volumes, and FAQ about NAS volumes.

Use FlexVolume to mount file systems

For information about how to mount file systems by using FlexVolume, see NAS volume overview. To ensure flexibility and reduce O&M complexity, we recommend that you use PVs or persistent volume claims (PVCs) instead of volumes when you use FlexVolume to mount file systems. You can mount file systems by using the FlexVolume storage driver provided by Alibaba Cloud. You cannot mount file systems by using the NFS driver provided by Kubernetes.

FlexVolume supports the following methods: For more information, see FAQ about NAS volumes.

Mount file systems on Windows containers

For more information, see Mount disks and SMB file systems to Windows pods.