- Documentation
Volcengine Kubernetes Engine
Volcengine Kubernetes Engine
User guide
Storage
TOS Volumes
FSX access methods
Encrypting data for TOS PVs
FSX access methods
Encrypting data for TOS PVs
Encrypting data for TOS PVs
You can encrypt data for TOS PVs. This feature applies to scenarios that require encrypted data storage or have compliance requirements. This topic describes how to configure data encryption for TOS PVs.
When you use a TOS PV by using the FSX client, you can use the Server-Side Encryption (SSE) feature, which achieves encryption and decryption during data writing and reading.
- During data writing, the system automatically encrypts the data written to the TOS PV, which effectively ensures the security of data stored on the server side.
- During data reading, the system automatically decrypts the server-side encrypted data, and the experience is consistent with that of unencrypted data.
- You have read Accessing TOS static PVs through the FSX client to learn about configuration methods and considerations for static TOS PVs with the FSX client in the cluster. This topic describes considerations and steps for encrypting TOS PV data. Other common information will not be covered here.
- A TOS bucket has been created. Service-side encryption has been enabled, and you have selected an encryption method (e.g., SSE-TOS or SSE-KMS). For details, see Creating buckets.
- To use KMS for encryption, you need to perform the following operations in advance:
- Log in to the KMS console and activate the KMS service.
- Mount parameters only take effect on newly mounted PVs instead of those already mounted. Therefore, you cannot modify the encryption method for created PVs.
- Currently, only the AES-256 encryption algorithm is supported. The SM4 encryption algorithm is not supported.
- When you select KMS encryption (SSE-KMS), additional KMS operation permissions are required during data reading or writing. The permission description and sample code are as follows:
- The kms:GenerateDataKey permission is required during data writing and encryption.
- The kms:Decrypt permission is required when reading encrypted data.
Creating through the console
- In the left navigation bar, click Cluster. Click the name of the target cluster to go to the cluster management page.
- In the left navigation bar on the cluster management page, click Storage > PersistentVolume.
- Click Create PersistentVolume to create a TOS PV with the FSX access type.
Creating through kubectl
- Create a YAML document vke-tos-fsx-static-pv.yaml for the PV.
SSE-TOS encryption method
SSE-KMS encryption method
You can configure the encryption method by using mountOptions mount parameters. When you use the SSE-TOS encryption method, the sample code is as follows:
You can configure the encryption method by using mountOptions mount parameters. When you use the SSE-KMS encryption method, the sample code is as follows:
- The following table describes mount parameters.
- Run the following command to create the PV.
After you create a workload and mount it to a PV, you can verify whether the TOS volume is mounted and whether persistent storage, encryption, and decryption are achieved by using 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.
- View the details of the uploaded file and confirm that its encryption method meets expectations.
- View the PV mount path in the pod again.
- The expected response is as follows. You can see the uploaded file, which indicates that the data volume is mounted and that persistent storage, encryption, and decryption are achieved.
Last updated: 2026.10.23 10:41:06