Skip to main content

Reference Architecture: Virtual Storage

Purpose: For platform engineers, provides datastore configuration, storage policies, and performance tuning guidance.

Overview

Virtual storage connects the physical disks (see Physical Storage) to Kubernetes VMs through datastores, storage policies, and CSI drivers. openCenter uses vSphere CSI or OpenStack Cinder CSI to provision persistent volumes dynamically. This document covers the hypervisor-level storage configuration that supports those CSI drivers.

vSphere Storage Options

OptionDescriptionBest For
VMFS Datastore (local)Local disks formatted as VMFS 6Single-host labs, small clusters
VMFS Datastore (SAN)SAN LUNs presented as VMFS 6Enterprise shared storage
NFS DatastoreNFS v3/v4.1 exports from NASFile-based workloads, simplicity
vSANDistributed storage across local disksHyper-converged, no external SAN

VMFS Datastore Configuration

SettingValue
VMFS Version6
Block Size1 MB (default, supports up to 64 TB VMDK)
Space ReclamationAutomatic (UNMAP)
MultipathingRound Robin (for SAN LUNs)
Path SwitchingIOPS = 1 (switch after every I/O for best distribution)

Datastore Layout

Create separate datastores for different workload tiers:

Datastore NameBackingSizePurpose
ds-etcd-nvmeNVMe SSD (RAID 1)500 GBControl plane VMs (etcd disks)
ds-vms-ssdSSD (RAID 10)4 TBWorker VMs, container images
ds-isoAny100 GBISO images, templates

Separating etcd onto NVMe-backed storage ensures that worker VM I/O does not affect etcd fsync latency.

vSphere Storage Policies

Storage policies define the service level for VM disks. The vSphere CSI driver uses these policies when provisioning PersistentVolumes.

Policy NameDatastore TagEncryptionReplicationUse Case
oc-etcdtier-0-nvmeOptionalN/A (RAID 1)etcd, control plane OS
oc-performancetier-1-ssdOptionalN/A (RAID 10)Worker OS, application PVs
oc-capacitytier-2-hddOptionalN/A (RAID 5/6)Logs, metrics, backups

Tag datastores in vCenter and reference tags in storage policies. The CSI driver matches PVC storageClassName to the corresponding policy.

vSAN Configuration (If Used)

SettingValue
vSAN Version7.0 U3+ or 8.0
Disk Group TypeAll-flash
Cache Tier1× NVMe SSD per disk group (≥ 400 GB)
Capacity Tier2–4× SSD per disk group
Deduplication & CompressionEnabled (all-flash only)
Erasure CodingRAID 5/6 for capacity tier (4+ hosts)
FTT (Failures to Tolerate)1 (RAID 1 mirror, 3-host minimum)
EncryptionAt-rest encryption (optional, requires KMS)
Stretched ClusterNot recommended for Kubernetes (latency sensitive)

vSAN requires a minimum of 3 hosts. Each host contributes local disks to the distributed datastore. The vSAN HCL must be checked for disk and controller compatibility before purchasing hardware.

OpenStack Storage (Cinder)

Cinder Backend Options

BackendProtocolPerformanceUse Case
LVM (local)iSCSIModerateSmall deployments, testing
Ceph RBDRADOSHighProduction, distributed storage
NetApp ONTAPiSCSI / NFSHighEnterprise NAS/SAN integration
Pure StorageiSCSI / FCVery HighHigh-performance workloads

Ceph RBD is the most common production backend for OpenStack + Kubernetes deployments. It provides distributed replication without dedicated SAN hardware.

Cinder Volume Types

Volume TypeBackendPropertiesUse Case
oc-etcdCeph SSD poolvolume_backend_name=ceph-ssdetcd, control plane
oc-performanceCeph SSD poolvolume_backend_name=ceph-ssdWorker disks, app PVs
oc-capacityCeph HDD poolvolume_backend_name=ceph-hddLogs, metrics, backups

Ceph Pool Configuration (If Using Ceph)

PoolDevice ClassReplicationPG CountPurpose
ceph-ssdSSD3× replicatedAuto (PG autoscaler)etcd, VMs, app PVs
ceph-hddHDD3× replicatedAutoLogs, metrics, backups

Set min_size=2 to allow I/O to continue with one OSD down. Set size=3 for three-way replication.

CSI Driver Integration

vSphere CSI

The vSphere CSI driver provisions VMDKs as PersistentVolumes. It requires:

RequirementValue
vCenter credentialsStored as Kubernetes Secret in vmware-system-csi namespace
Storage PolicyMust exist in vCenter and be referenced in StorageClass
VM HardwarePVSCSI controller, Hardware Version 15+
PermissionsCSI-specific vCenter role (see vSphere CSI docs)

Example StorageClass:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: oc-performance
provisioner: csi.vsphere.vmware.com
parameters:
storagepolicyname: "oc-performance"
reclaimPolicy: Delete
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer

OpenStack Cinder CSI

The Cinder CSI driver provisions Cinder volumes as PersistentVolumes. It requires:

RequirementValue
OpenStack credentialsStored as Kubernetes Secret (cloud-config)
Availability ZoneMust match Nova AZ for volume attachment
Volume TypeMust exist in Cinder

Example StorageClass:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: oc-performance
provisioner: cinder.csi.openstack.org
parameters:
type: oc-performance
reclaimPolicy: Delete
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer

In-Cluster Storage (Longhorn)

openCenter deploys Longhorn as an in-cluster distributed storage engine. Longhorn runs on Kubernetes worker nodes and uses their local disks to provide replicated block storage.

SettingValue
Replica Count3
Data LocalityBest effort
Backup TargetS3-compatible (MinIO, Harbor) or NFS
Disk Path/var/lib/longhorn on worker nodes

Longhorn is complementary to the hypervisor-level CSI driver. Use the CSI driver for VM-level disks and Longhorn for application-level PersistentVolumes that need replication across Kubernetes nodes.

Performance Tuning

TuningvSphereOpenStack
Disk I/O schedulernoop or none in guest OSnone in guest OS
Queue depthPVSCSI default (64)virtio-blk default (128)
Read-ahead256 KB for sequential workloads256 KB
Disk alignmentAutomatic with VMFS 6Automatic with virtio
Thin provisioningEnabled (default)Enabled (Cinder default)

Set the guest OS I/O scheduler to none when running on a hypervisor. The hypervisor and storage controller handle scheduling; a guest-level scheduler adds latency.

Considerations

  • Thin vs. thick provisioning: Thin provisioning saves space but can cause out-of-space conditions if the datastore fills. Monitor datastore free space and alert at 20% remaining.
  • Snapshots: VM-level snapshots (vSphere/Cinder) are not a backup strategy. They consume growing delta disks and degrade I/O performance. Use Velero with CSI snapshots for Kubernetes-level backups.
  • Encryption: vSphere VM Encryption and Cinder volume encryption both require a Key Management Server (KMS). Deploy a KMS (e.g., Barbican for OpenStack, HyTrust for vSphere) before enabling encryption.
  • Storage DRS (vSphere): If using multiple VMFS datastores, enable Storage DRS to balance capacity and I/O across datastores automatically.
  • Ceph tuning: For Ceph backends, set osd_op_queue_cut_off=high and tune osd_recovery_max_active to limit recovery I/O impact on production workloads.