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.
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.
- 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.
- Mount file systems as static persistent volumes (PVs). For more information, see Configure the YAML file to use a NAS file system that is mounted as a static PV.
- Mount file systems as dynamic PVs. For more information, see Mount a NAS file system as a dynamic volume.
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.
Mount file systems on Windows containers
For more information, see Mount SMB file systems to Windows containers.