CSI vSphere module (shturval-capvs-csi)
About the service
| Parameter | Description |
|---|---|
| GUI name | CSI vSphere Module |
| System name (identifier) | shturval-capvs-csi |
| Cluster Assignment | Dynamic provisioning of volumes in vSphere (VMware); connecting vSphere disks as PersistentVolume upon request. |
| Critical | No |
| Public repository | vSphere CSI driver |
| Dependencies | shturval-networking |
| Namespace | shturval-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>
| Parameter | Description | Type | Example |
|---|---|---|---|
global.insecure-flag | Disable TLS checking (true - if vCenter uses a self-signed certificate) | boolean | true |
global.cluster-id | Unique cluster name | string | shturval-cluster |
storageclass.expansion | Allow PVC dynamic expansion | boolean | true |
storageclass.datastoreurl | vSphere Datastore URL (Summary Datastores Section) | string | ds:///vmfs/volumes/5f9ae8c0-e4bedd20-8f0c-0894ef5d8f68/ |
vcenter.<name> | vCenter name | string | 11/10/12/13 |
vcenter.server | vCenter IP or URL | string | 11/10/12/13 |
vcenter.user | vCenter username (with domain) | string | shturval@domain.local |
vcenter.datacenters | List of data centers | array | /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>
| Parameter | Description | Type | Example |
|---|---|---|---|
vcenter.<name> | vCenter name | string | 11/10/12/13 |
vcenter.user | Username (with domain) | string | shturval@domain.local |
vcenter.password | User Password | string | K8s_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:
- Enable the
disk.EnableUUIDparameter in the vSphere client: Edit Settings → VM Options → Advanced → Edit Configuration → setdisk.EnableUUID = True. - Upgrade the VM hardware version to version 15 or higher: Actions → Compatibility → Upgrade VM Compatibility.
- 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:
- Perform the same VM settings (disk.EnableUUID, hardware version, SCSI controller) for each node.
- Sequentially execute
drainnode, reboot the VM, thenuncordon; wait for the load to return before moving to the next node. - If you have an old vSphere CSI installation, remove it.
- Install the new vSphere CSI in the namespace
shturval-capvs-csiwith 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.