This topic describes the recommended methods that you can use to mount NAS file systems on Kubernetes clusters. 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.

Storage plug-ins

Container Service for Kubernetes (ACK) support FlexVolume and CSI. FlexVolume and CSI supports 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 you with flexible and diverse configuration parameters, improved user experience, and reduced O&M complexity.

Whether you mount file systems on ACK clusters or self-managed Kubernetes clusters, we recommend that you use FlexVolume or CSI. Take note of the following information:
  • To mount a file system on a newly created Kubernetes cluster, we recommend that you use CSI.
  • 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 Overview.

Use CSI to mount file systems

For information about how to mount file systems byusing CSI, see Use NAS file systems provided by Apsara File Storage NAS.

CSI supports the following methods:

Use FlexVolume to mount file systems

For information about how to mount file systems by using FlexVolume, see Use NAS volumes. To ensure flexibility and reduce O&M complexity, we recommend that you use PVs or persistent volume claims (PVCs) rather than 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:

Mount file systems on Windows containers

For more information, see Mount SMB file systems to Windows containers.