You can use volumes created from Alibaba Cloud NAS in Kubernetes clusters.

Currently, Alibaba Cloud NAS can be mounted to Kubernetes clusters as follows:
  • Through the flexvolume plug-in
    • Static volumes
      • Directly as volumes
      • Through PVs and PVCs
    • Dynamic volumes
  • Through the NFS driver
    • Static volumes
      • Directly as volumes
      • Through PVs and PVCs
    • Dynamic volumes

Prerequisites

You have created a NAS file system in the NAS console and added a mount point in the file system. The NAS file system and your cluster are deployed in the same VPC network. You can log on to the NAS console to create a NAS file system and a mount point.

For example, the mount point may be as follows: 055f84ad83-ixxxx.cn-hangzhou.nas.aliyuncs.com.

Notes

  • Alibaba Cloud NAS is a shared storage service. One PVC can be shared among multiple Pods.
  • If you need to delete a NAS mount point, you must uninstall the NAS file system first. Otherwise, the operating system may hang up.
  • After a NAS mount point is created, you need to wait till the mount point is ready for use.
  • We recommend that you choose the v3 mount protocol.
  • We recommend that you upgrade flexvolume to the latest version before you start using NAS volumes.

Scenarios

  • NFS driver

    Kubernetes provides the NFS driver by default. If your cluster does not have the flexvolume plug-in, you can use the NFS driver instead.

  • flexvolume plug-in

    The flexvolume plug-in provides optimized configuration settings. For example, it enables you to create sub-directories and configure mount parameters.

  • Static volumes

    NAS is a shared storage service. You can mount NAS as static volumes to meet the needs of different scenarios.

  • Dynamic volumes

    You may use dynamic volumes when you need to mount multiple NAS sub-directories for different applications.

    You can use dynamic volumes when you deploy SatefulSets and configure different NAS volumes for multiple Pods.