StorPool CSI

Overview

The StorPool CSI driver enables container orchestration system (like Kubernetes) that comply with the Container Storage Interface (CSI) to dynamically provision and attach StorPool volumes. The driver only supports the StorPool native protocol, hence it’s required that all Kubernetes hosts have the StorPool native client service (storpool_block) configured and running.

Prerequisites

  • You have obtained the driver from the storpool-csi repository.

  • StorPool is already installed and configured.

Deployment

The StorPool CSI driver can be deployed using the pre-compiled manifests inside the manifests/ directory using the following steps:

  1. Apply the ControllerPlugin and NodePlugin manifests:

    kubectl apply -f manifests/*
    

    Note that the manifests will create all respective resource inside the kube-system namespace. Feel free to edit them if you want to create the resources elsewhere.

  2. Create a StorageClass resource.

    Mapping a StorageClass to a StorPool template allows the Kubernetes operator to utilize multiple storage media if such is present in the StorPool cluster. For more information about StorPool templates, see Templates.

    Here is an example StorageClass:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: storpool-nvme
    provisioner: csi.storpool.com
    allowVolumeExpansion: true
    parameters:
      template: nvme
    volumeBindingMode: WaitForFirstConsumer
    
  1. Finally, you can create a PVC (see Persistent Volumes) to test if the CSI is configured properly.

    Note that the StorPool CSI supports only the ReadWriteOnce access mode.

    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: test-storpool-pvc
    spec:
      storageClassName: storpool-nvme
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 10Gi