- Documentation
Volcengine Kubernetes Engine
Volcengine Kubernetes Engine
User guide
Storage
NAS volumes
FSX access methods
Accessing FileNAS static PV through the FSX client
FSX access methods
Accessing FileNAS static PV through the FSX client
Accessing FileNAS static PV through the FSX client
FSX can access FileNAS file systems based on unified policies for access, authentication, and management. This topic describes how to access a static FileNAS PersistentVolume (PV) through the FSX client.
- The csi-fsx and fsx-service add-ons have been installed and upgraded to the latest version. For details, see Upgrading add-ons.
- A valid key has been created in the target namespace. To create such a key, you need an access key ID (AK) and a secret access key (SK). For information about how to get an AK and SK, see Obtaining API access keys. To use a temporary token for authentication, you need to implement the logic for refreshing tokens.
- The kubectl tool has already been installed locally, and the target cluster has been connected by using kubectl. For details, see Connecting to clusters.
- Currently, only cache-type FileNAS supports access points. This support is in the beta stage. To request access, contact your account manager to get trial permissions.
- To use a temporary token for authentication, you need to implement the logic for refreshing tokens.
- Stateful workloads require exclusive access to a volume and do not support a manually created PersistentVolumeClaim (PVC).
- This feature is unavailable in clusters running on Kubernetes v1.20 and earlier.
Step 1: (Optional) Create a policy
tip
- If you use the AK and SK of the root user, you can skip this step.
- To dynamically refresh temporary tokens, see the AssumeRole API document.
For detailed instructions on creating a policy, see Creating custom policies. The following is an example of creating a FileNAS policy: Read-only configuration example
Read and write access configuration example
The following configuration example grants read-only access to an access point.
The following configuration example grants read and write access to an access point.
- Create a YAML document for the Secret. The following vke-nas-fsx-secret.yaml file serves as an example:
Description
You can use the echo -n "${ak}" | base64 command to perform Base64 encoding on items such as the AK and SK. Note that you need to replace ${ak} with your actual value. For example, if ${ak} is demo, the encoding command is echo -n "demo" | base64, which produces the encoded result ZGVtbw==.
- Run the following command to create the Secret.
- Create a YAML document for the PV. The following vke-nas-fsx-static-pv.yaml file serves as an example:
tip
When you use the FSX client to mount FileNAS storage, you can configure only basic parameters. For details, see FSX mounting parameters. - The key parameters are described in the following table.
- Run the following command to create the PV.
- Create a YAML document for the PVC. The following vke-nas-fsx-static-pvc.yaml file serves as an example:
- The key parameters are described in the following table.
- Run the following command to create the PVC.
- Run the following command to view the result of the static association between the PVC and PV.
- If the response is similar to the following one, the binding is successful.
Step 5: Create an application and mount the PV
- Create a YAML document for the Deployment. The following vke-nas-fsx-static-deployment.yaml file serves as an example:
- Run the following command to create the Deployment.
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.
- Run the following command to check whether the PV is mounted to the specified path in the pod.
- The expected response is as follows.
- Check the mount path in the pod to view the data in the PV.
- The expected response is as follows.
- Check the mount path of the PV in the newly created pod.
- 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.
Last updated: 2026.07.24 10:53:33