The module installs and configures the CSI driver for Netapp 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.Netapp.com CSI driver. Caution! Currently, supports 3par SAN devices. For other Netapp SAN support please contact tech support.

System requirements and recommendations

Requirements

  • Presence of a deployed and configured Netapp 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-netapp module. This will result in the following actions across all cluster nodes:
    • registration of the CSI driver;
    • launch of service pods for the csi-netapp components.
kubectl apply -f - <<EOF
apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
  name: csi-netapp
spec:
  enabled: true
  version: 1
EOF
  • Wait for the module to become Ready.
kubectl get module csi-netapp -w

Creating a StorageClass

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

kubectl apply -f -<<EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: NetappStorageConnection
metadata:
  name: Netapp
spec:
  controlPlane:
    backendAddress: "172.17.1.55" # mutable, SAN API address
    username: "3paradm" # mutable, API username
    password: "3pardata" # mutable, API password
    serviceName: "primera3par-csp-svc"
    servicePort: "8080"
EOF
kubectl apply -f -<<EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: NetappStorageClass
metadata:
  name: Netapp
spec:
  pool: "test-cpg"
  accessProtocol: "iscsi" # fc или iscsi (default iscsi), immutable
  fsType: "xfs" # xfs, ext3, ext4 (default ext4), mutable
  storageConnectionName: "Netapp" # immutable
  reclaimPolicy: Delete # Delete of Retain
  cpg: "test-cpg"
EOF
  • You can check objects creation (Phase must be Created):
kubectl get Netappstorageconnections.storage.deckhouse.io <Netappstorageconnection name>
kubectl get Netappstorageclasses.storage.deckhouse.io <Netappstorageclass name>

Checking module health

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