Manage PVCs with the CLI
Manage Persistent Volume Claims on a Kubernetes cluster from the command line.
The uvx v8x storage command group provides PVC CRUD operations. The namespace defaults to your username (derived from your login email) but can be overridden with --namespace.
Inspect the storage commands
If this is your first time using the storage commands, start with:
uvx v8x storage --help
uvx v8x storage create --help
The core workflow is:
uvx v8x storage createto provision a new PVCuvx v8x storage listto see PVCs in a namespaceuvx v8x storage getto inspect a specific PVCuvx v8x storage deleteto remove a PVCuvx v8x storage list-availableto discover storage classes
Create a PVC
Provision a new Persistent Volume Claim:
# Creates in your user namespace (derived from login email)
uvx v8x storage create my-data my-cluster --size 50Gi
# Override with a specific namespace, storage class, or access mode
uvx v8x storage create my-data my-cluster --size 100Gi \
--namespace custom-ns --storage-class ceph-block --access-mode ReadWriteMany
Key options:
CLUSTER_NAME(required, positional) - the target Kubernetes cluster--size(required) - capacity with unit suffix (Ki, Mi, Gi, Ti)--namespace- the Kubernetes namespace (defaults to your username)--storage-class- the storage class to use (defaults to the cluster default)--access-mode- one ofReadWriteOnce,ReadOnlyMany,ReadWriteMany,ReadWriteOncePod
Success looks like this: the command returns the new PVC details including its name, namespace, size, and initial status.
List PVCs
See all PVCs in a namespace:
# Lists PVCs in your user namespace
uvx v8x storage list my-cluster
# Override with a specific namespace
uvx v8x storage list my-cluster --namespace custom-ns
Success looks like this: a table of PVCs showing their name, namespace, size, status, and storage class.
Get PVC details
Inspect a specific PVC:
# Gets PVC from your user namespace
uvx v8x storage get my-data my-cluster
# Override with a specific namespace
uvx v8x storage get my-data my-cluster --namespace custom-ns
Success looks like this: full details of the PVC including capacity, access modes, volume name, and current phase.
Delete a PVC
Remove a PVC you no longer need:
# Deletes PVC from your user namespace
uvx v8x storage delete my-data my-cluster
# Override with a specific namespace
uvx v8x storage delete my-data my-cluster --namespace custom-ns
# Skip the confirmation prompt
uvx v8x storage delete my-data my-cluster --force
Success looks like this: the PVC is removed from the namespace. Subsequent list commands no longer show it.
List available storage classes
Discover which storage classes are available on your cluster:
uvx v8x storage list-available my-cluster
Success looks like this: a list of storage classes with their provisioner, reclaim policy, and other metadata.