Overview

Run vessl storage --help to view the list of commands, or vessl storage [COMMAND] --help to view individual command instructions.

Commands

Create an external storage

vessl storage create [OPTIONS] NAME
ArgumentDescription
NAMEName of the storage
OptionDescription
--storage-type(Required) Type of the storage. Options: s3, gcs, nfs, host-path.
--path(Required) Path to the storage. The format depends on the storage type:
  • For gcs: [bucket_name]/[path] (e.g., my-gcs-bucket)
  • For s3: [bucket_name]/[path] (e.g., my-s3-bucket)
  • For nfs: [server]:[path] (e.g., my.nfs.com:/shared/data)
  • For host-path: [path] (e.g., /data/host-folder)
--credential-name

Credential name registered in vessl credentials.

This option is only required when storage type is s3 or gcs

--cluster-name

Cluster name of registered in vessl.

This option is only required when storage type is nfs or host-path

VESSL External Storage acts as a bridge to external storage services (e.g., S3, GCS, etc.). Make sure to configure the external storage settings before proceeding.

If you do not want to use external storage, you can use the default VESSL storage, vessl-storage.

Examples

  1. Create an S3 storage:
vessl storage create --storage-type s3 --path my-s3-bucket --credential-name my-s3-credential my-s3-storage 
  1. Create a GCS(Google Cloud Storage) storage:
vessl storage create --storage-type gcs --path my-gcs-bucket --credential-name my-s3-credential my-gcs-storage
  1. Create an NFS storage:
vessl storage create --storage-type nfs --path my.nfs.com:/shared/data --cluster-name my-cluster my-nfs-storage
  1. Create a Host-Path storage:
vessl storage create --storage-type host-path --path /data/host-folder --cluster-name my-cluster my-host-storage

List all storages

vessl storage list

Delete an external storage

vessl storage delete NAME
ArgumentDescription
NAMEName of the storage

Create a volume in storage

vessl storage create-volume [OPTIONS] NAME
ArgumentDescription
NAMEName of the volume
OptionDescription
--storage-name(Required) Name of the storage.
--tagTag(s) of the storage. You can attach multiple tags by specifying this option multiple times.

List volumes in storage

vessl storage list-volumes [OPTIONS]
OptionDescription
--storage-name(Required) Name of the storage.
--keywordKeyword to search for.

Delete volume in storage

vessl storage delete-volume [OPTIONS] NAME
ArgumentDescription
NAMEName of the volume
OptionDescription
--storage-name(Required) Name of the storage.

Copy a volume file

You can copy a file or directory either from local to a VESSL volume or from a VESSL volume to a local path.

vessl storage copy-file SOURCE DEST
ArgumentDescription
SOURCE

Source path. The source can be either a local file path or a VESSL volume.

If the source is a VESSL volume, SOURCE must follow the format: volume://{STORAGE_NAME}/{VOLUME_NAME}.

DEST

Destination path. The destination can be either a local file path or a VESSL volume.

If the destination is a VESSL volume, DEST must follow the format: volume://{STORAGE_NAME}/{VOLUME_NAME}.

One of the paths (either SOURCE or DEST) must be a local path, and the other must be a VESSL volume path.

Examples

  1. Copy a local file to a VESSL volume:
vessl storage copy-file ./local-file.txt volume://my-storage/my-volume
  1. Copy a directory from a VESSL volume to a local path:
vessl storage copy-file volume://my-storage/my-volume ./local-directory

List a volume file

vessl storage list-files PATH
ArgumentDescription
PATHVESSL volume path. PATH must follow the format: vessl://{STORAGE_NAME}/{VOLUME_NAME}

Delete a volume file

vessl storage delete-file PATH
ArgumentDescription
PATHVESSL volume path. PATH must follow the format: vessl://{STORAGE_NAME}/{VOLUME_NAME}/{FILE_PATH}
OptionDescription
-r, --recursiveRequired if target file is a directory