The module lifecycle stage: General Availability
Available in: EE
The storage-volume-data-manager module enables secure HTTP-based export of persistent volume contents. It creates a namespaced DataExport resource in the target namespace, which references the volume to be exported via the targetRef field. The module supports PersistentVolumeClaim and VolumeSnapshot resource types.
The module is built on the standard Go file server and supports both filesystem and block-level volume export modes. User authentication is handled through Kubernetes RBAC, with support for partial content downloads using HTTP Range headers.
Key Parameters
-
ttl: Time-to-live duration after the last server access (file download or directory listing). When the TTL expires, the exporter pod is automatically deleted and the PVC is released back to the original PV. TheDataExportresource’sReadycondition is set tofalsewith reasonExpired. -
publish: When set totrue, enables external cluster access to the exporter pod. A public URL is generated in thePublicURLfield with the format:https://data-exporter.<public-domain>/<namespace>/<user-pvc-name>/.
Quick Start
Enabling the Module
To enable the module, use the following command:
d8 k apply -f - <<EOF
apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
name: storage-volume-data-manager
spec:
enabled: true
version: 1
EOF
Creating DataExport Resources
Use the d8 utility to create and manage DataExport resources with the following syntax:
d8 data -n <namespace> create <DataExport resource name> <resource type for export>/<resource name for export> --ttl 5m
PVC resources can only be exported when they are not currently mounted by any pods.
Example: Creating a DataExport resource for a PVC named “data” in the “project” namespace with a 5-minute TTL:
d8 data -n project create my-export pvc/data --ttl 5m
Retrieving Resource Information
To view details about the created DataExport resource, execute the following command:
d8 k -n project get de my-export
Downloading Data
Use the following command to download files from exported volumes:
d8 data -n <namespace> download <resource type (pvc/vs/dataexport)>/<resource name>/<file path> -o <file name> --publish
Example:
d8 data -n project download dataexport/my-export -o test_file.txt --publish