Available in:  EE

The module installs and configures the CSI driver for Huawei SAN. The module allows you to create a StorageClass in Kubernetes by creating Kubernetes custom resources YadroStorageClass.

Caution! The user is not allowed to create a StorageClass for the csi.huawei.com CSI driver. Caution! Currently, supports 3par SAN devices. For other Huawei SAN support please contact tech support.

System requirements and recommendations

Requirements

  • Presence of a deployed and configured Huawei SAN.
  • Unique iqn in /etc/iscsi/initiatorname.iscsi on each of Kubernetes Nodes

Quickstart guide

Note that all commands must be run on a machine that has administrator access to the Kubernetes API.

Enabling module

  • Enable the csi-huawei module. This will result in the following actions across all cluster nodes:
    • registration of the CSI driver;
    • launch of service pods for the csi-huawei components.
kubectl apply -f - <<EOF
apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
  name: csi-huawei
spec:
  enabled: true
  version: 1
EOF
  • Wait for the module to become Ready.
kubectl get module csi-huawei -w

Creating a StorageClass

To create a StorageClass, you need to use the HuaweiStorageClass and HuaweiStorageConnection resource. Here is an example command to create such a resource:

kubectl apply -f -<<EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: HuaweiStorageConnection
metadata:
  name: huaweistorageconn
spec:
  storageType: OceanStorSAN
  pools:
    - test
  urls: 
    - https://192.168.128.101:8088 
  login: "admin"
  password: "ivkerg43grdsf_"
  protocol: ISCSI
  portals:
    - 10.240.0.101
    - 10.250.0.101 
  maxClientThreads: 30

EOF
kubectl apply -f -<<EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: HuaweiStorageClass
metadata:
  name: huaweisc
spec:
  fsType: ext4
  pool: test
  reclaimPolicy: Delete
  storageConnectionName: huaweistorageconn
  volumeBindingMode: WaitForFirstConsumer
EOF
  • You can check objects creation (Phase must be Created):
kubectl get huaweistorageconnections.storage.deckhouse.io <huaweistorageconnection name>
kubectl get huaweistorageclasses.storage.deckhouse.io <huaweistorageclass name>

Checking module health

You can verify the functionality of the module using the instructions here