You need to enable JavaScript to run this app.
Volcengine Kubernetes Engine

Volcengine Kubernetes Engine

Copy page
Download PDF
Storage
Mounting EFS via FSX
Copy page
Download PDF
Mounting EFS via FSX
This topic describes how to use EFS static volumes via the FSX client in VCI workloads.​
Background​
VCI supports connecting to Elastic File System (EFS) via the FSX protocol, serving as a high-availability POSIX (Portable Operating System Interface) file system client for EFS. Through this client, EFS storage can be mounted to a Linux system, enabling the storage to function as a local file system on the Linux system for data storage and management.​
For more information about the FSX client, see Introducing FSX clients.​
Limits​
When mounting EFS via FSX in VCI, please note the following usage restrictions:​
  • Temporary token authentication is not supported.​
  • StatefulSet workloads require a dedicated volume. Manually created PersistentVolumeClaims (PVCs) are currently not supported.​
  • The FSX client currently only supports the x86_64 architecture and does not support Windows or macOS environments. For details, see Runtime environment.​
Prerequisites​
  • When operating with IAM identities (users or roles), you need to obtain the AK/SK required for creating keys, which are used for mounting EFS storage. For information on how to obtain account AK/SK, see API keys (access key and API key).​
  • When using the kubectl command line, you need to install the kubectl tool locally in advance and connect to the target cluster via kubectl. For details, see Connecting to clusters using kubectl.​
Procedure​
​
Configure through the console
Use kubectl
​
Step 1: Create a PV​
  1. Log in to the VKE console.​
  1. In the left navigation bar, click Cluster. Click the name of the target cluster to go to the cluster management page.​
  1. In the left navigation bar on the cluster management page, click Storage > PersistentVolume.​
  1. Click Create PersistentVolume and configure parameters on the page that appears.​
  • ​
    Parameter​
    Description​
    Creation method​
    Select a method for creating the PV. Currently, you can select Static creation.​
    Name​
    Specify a name for the PV. The name must be unique within the cluster.​
    StorageClass type​
    Select a PV type. In this scenario, select EFS.​
    Access type​
    Access type for the PV. In this scenario, FSX is selected.​
    Access mode​
    Select a PV access mode. Currently, you can select ReadWriteMany, which enables read and write access by multiple nodes.​
    Project​
    Assign the PV to a project so that you can perform operations such as maintenance and authorization at the project level. By default, the default project is selected. For details, see Project management.​
    Access point​
    Select an access point that exists under a created EFS file system and is in the same VPC as the cluster.​
    Mount path​
    Enter a valid subdirectory that complies with the on-screen rules. The default directory is the root directory, which is represented by /.​
    tip​
    Ensure that the subdirectory already exists in EFS.​
    ​
  1. Click Confirm to finish.​
Step 2: Create a PVC​
  1. In the left navigation bar on the cluster management page, click Storage > PersistentVolumeClaim.​
  1. Click Create PersistentVolumeClaim and configure parameters on the page that appears.​
  • ​
    Parameter​
    Description​
    Namespace​
    Select the namespace to which the PVC belongs. We recommend selecting a custom namespace or the system-created default namespace. For details about namespaces, see Namespace overview.​
    Name​
    Specify a name for the PVC. The name must be unique within the cluster.​
    StorageClass type​
    Select the storage type. In this scenario, select EFS.​
    Access mode​
    Select a PVC access mode. You can select ReadWriteMany, which enables read and write access by multiple nodes.​
    Billing type​
    Select a resource billing type as needed. Currently, only Pay-as-you-go is supported.​
    Creation method​
    Configure the method for creating a PVC. In this scenario, select Use an existing PersistentVolume.​
    PersistentVolume​
    Select the created PV for binding.​
    ​
  1. Click Confirm to finish.​
Step 3: Create an application and mount the PV​
After the EFS PV is created, add the PV to a workload that will use the PV. Supported workloads include Deployment, StatefulSet, Job, CronJob, and DaemonSet.​
You can add a PV to a workload when creating it or updating it. For details, see Workloads.​
​
Validate results​
After creating a workload and mounting a PV to it as described in the preceding steps, you can verify the volume mounting status and persistent storage via the following methods.​
  1. The target cluster has been connected by using kubectl. For details, see Connecting to clusters using kubectl.​
  1. Run the following command to check whether the PV is mounted to the specified path in the pod.​
  • ​
    kubectl exec vci-efs-static-deployment-xxx -- df | grep tmp​
    ​
  • The expected response is as follows.​
  • ​
    cnshbe27***.3qda7dutskr***.efs.ivolces.com:/ 10995116277760 0 10995116277760 0% /tmp​
    ​
  1. Execute the following command to view the mount path in the pod, i.e., to view the data in the volume.​
  • ​
    kubectl exec vci-fsx-static-deployment-xxx -- ls /tmp​
    ​
  • The expected response is as follows.​
  • ​
    lost+found​
    ​
  1. Execute the following command to write a file into the PersistentVolume (PV).​
  • ​
    kubectl exec vci-fsx-static-deployment-xxx -- touch /tmp/test​
    ​
  1. Execute the following command to delete the pod.​
  • ​
    kubectl delete pod vci-fsx-static-deployment-xxx​
    ​
  1. Execute the following command to view the PV mount path under the newly created pod.​
  • ​
    kubectl exec vci-fsx-static-deployment-xxx -- ls /tmp​
    ​
  • The expected result is as follows. You can see that the file written to the PV still exists and is not deleted along with the pod. This indicates that persistent storage of data is achieved.​
  • ​
    lost+found ​
    test​
    ​
Last updated: 2026.09.10 16:24:17