CSI vSphere module (shturval-capvs-csi)

About the service

ParameterDescription
GUI nameCSI vSphere Module
System name (identifier)shturval-capvs-csi
Cluster AssignmentDynamic provisioning of volumes in vSphere (VMware); connecting vSphere disks as PersistentVolume upon request.
CriticalNo
Public repositoryvSphere CSI driver
Dependenciesshturval-networking
Namespaceshturval-capvs-csi

Purpose

shturval-capvs-csi - vSphere CSI module. Allows you to mount disks from VMware vSphere as PersistentVolume on demand via StorageClass when using vSphere-based clusters.

Where to configure

Services and repositories → Installed services → shturval-capvs-csi → Manage.

Setting up storage classes: StorageClasses. For clusters on vSphere, after installing the shturval-capvs provider, when creating a cluster with CSI integration, the module can be installed automatically.

Installing a chart in a cluster

If CSI integration was enabled when creating a cluster with the vSphere provider, the module is installed automatically. To manually install, go to Services and Repositories → Available Charts, find the shturval-capvs-csi chart and click Install.

In the Service Specification block, specify as customvalues:

Customvalues example
global:
  config:
    global:
      insecure-flag: true
      cluster-id: <your value>
    storageclass:
      expansion: true
      datastoreurl: <your value>
    vcenter:
      <vCenter name>:
        server: <your value>
        user: <your value>
        password: <your value>
        datacenters:
          - <your value>
ParameterDescriptionTypeExample
global.insecure-flagDisable TLS checking (true - if vCenter uses a self-signed certificate)booleantrue
global.cluster-idUnique cluster namestringshturval-cluster
storageclass.expansionAllow PVC dynamic expansionbooleantrue
storageclass.datastoreurlvSphere Datastore URL (Summary Datastores Section)stringds:///vmfs/volumes/5f9ae8c0-e4bedd20-8f0c-0894ef5d8f68/
vcenter.<name>vCenter namestring11/10/12/13
vcenter.servervCenter IP or URLstring11/10/12/13
vcenter.uservCenter username (with domain)stringshturval@domain.local
vcenter.datacentersList of data centersarray/DC03

After installation, StorageClass vsphere-csi will be added to the cluster. To use it by default, remove the storageclass.kubernetes.io/is-default-class: "true" annotation from the StorageClass local-path (Storage → StorageClasses → local-path → Labels and Annotations).

Volume snapshots

To start the csi-snapshotter sidecar in the CSI controller, set controller.config.block-volume-snapshot: true in customvalues at the same level as global (via ShturvalServicePatch). The vCenter account must have permissions for volume snapshots, including CNS > Searchable and Datastore > Low level file operations (Datastore.FileManagement). Step-by-step instructions and VolumeSnapshotClass: Snapshots.

vCenter account

To change vCenter credentials, use ShturvalServicePatch (see How to manage CustomValues of services):

Example ShturvalServicePatch
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
  name: <resource name>
spec:
  shturvalServiceConfigName: shturval-capvs-csi
  customvalues:
    global:
      config:
        vcenter:
          <vCenter name>:
            user: <your value>
            password: <your value>
ParameterDescriptionTypeExample
vcenter.<name>vCenter namestring11/10/12/13
vcenter.userUsername (with domain)stringshturval@domain.local
vcenter.passwordUser PasswordstringK8s_admin

Using vSphereCSI in a cluster with the Shturval v2 provider

Using vSphere CSI in a cluster with the Shturval v2 provider is only possible with hosts deployed on the vSphere virtualization platform.

Installation when creating a cluster

On each host, before starting the installation (for a client cluster - before adding hosts to the provider), run:

  1. Enable the disk.EnableUUID parameter in the vSphere client: Edit Settings → VM Options → Advanced → Edit Configuration → set disk.EnableUUID = True.
  2. Upgrade the VM hardware version to version 15 or higher: Actions → Compatibility → Upgrade VM Compatibility.
  3. Add VMware Paravirtual SCSI storage controller: Edit Settings → Virtual Hardware → Add New Device → SCSI Controller → type VMware Paravirtual.

Installation in a deployed cluster

If the cluster is already deployed with a providerShturval v2 on vSphere hosts:

  1. Perform the same VM settings (disk.EnableUUID, hardware version, SCSI controller) for each node.
  2. Sequentially execute drain node, reboot the VM, then uncordon; wait for the load to return before moving to the next node.
  3. If you have an old vSphere CSI installation, remove it.
  4. Install the new vSphere CSI in the namespace shturval-capvs-csi with customvalues from the section above.

After installation, the StorageClass is created as default. If necessary, remove the default flag from one of the StorageClass (local-path or vsphere-csi).


How to deploy this service - How to deploy a new service.