Skip to main content

Standard CSI Storage

Standard CSI storage provides local persistent volumes for your Kubernetes workloads.

note

Standard storage is block storage that binds to a specific node. It does not support ReadWriteMany access mode across multiple nodes. For shared storage across nodes, use NFS storage instead.

Setup

1. Create Storage Class

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: standard
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: vcloud.csi.vnetwork.dev
parameters:
fsType: "ext4"
uid: "1001"
gid: "1001"
permission: "0755"
mountFlags: "noatime,nodiratime"
allowVolumeExpansion: true
#volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain

2. Create PVC

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: example-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: standard

Usage Example

apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
replicas: 1
selector:
matchLabels:
app: example
template:
metadata:
labels:
app: example
spec:
containers:
- name: app
image: nginx
volumeMounts:
- name: storage
mountPath: /data
volumes:
- name: storage
persistentVolumeClaim:
claimName: example-pvc

Managing Volume Snapshots

Standard CSI storage volumes support snapshot management through the cloud infrastructure interface.

Volume Snapshots Overview

Volume Snapshots Volume snapshots provide point-in-time backups of your storage volumes, allowing you to:

  • Create backups before making changes
  • Restore volumes to previous states
  • Migrate data between instances

Creating Snapshots

Creating Snapshots

  1. Navigate to your instance in the cloud console
  2. Go to the Instance Volumes section
  3. Click Create Snapshot for the desired volume
  4. Provide a snapshot name and description

Managing Snapshots

In the Volume Snapshots section, you can:

  • View all snapshots with their status and details
  • Revert volumes to previous snapshot states
  • Delete snapshots when no longer needed

Snapshot Operations

ActionDescriptionRequirements
CreateTake a point-in-time backupVolume must be attached
RevertRestore volume to snapshot stateInstance must be stopped
DeleteRemove snapshot permanentlySnapshot must be inactive
note

Important: Snapshots can only be reverted when the instance is stopped. Please stop the instance before attempting to revert any snapshots. CSI Snapshot: Expect snapshot support for this CSI-level in the near future, as we're prioritizing its implementation.

Troubleshooting

# Check PVC status
kubectl get pvc example-pvc
kubectl describe pvc example-pvc