Skip to content

Latest commit

 

History

History
82 lines (57 loc) · 2.77 KB

disk.md

File metadata and controls

82 lines (57 loc) · 2.77 KB

Disk CSI Driver

Disk CSI driver is available to help simplify storage management. Once user creates PVC with the reference to a Disk storage class, disk and corresponding PV object get dynamically created and become ready to be used by workloads.

Features Support

Disk Snapshot: disk-snapshot

Block Volumes: disk-block

Resize Volume: disk-shared

Configuration Requirements

  • Authorizations to access related cloud resources
  • StorageClass with diskplugin.csi.alibabacloud.com as provisioner name.
  • Service Accounts with required RBAC permissions

Demo

How to Use

We recommend Alibaba Cloud Container Service for Kubernetes (ACK), which will deploy CSI drivers for you automatically.

Alternatively, you can try to deploy it manually on ECS, which is covered by this document. We do not provide commercial support for such deployment, however.

Requirements

  • A working Kubernetes cluster deployed on ECS.
  • Local kubectl configured to communicate with this cluster.

Step 1: Install the CSI driver

Please refer to the installation guide for detailed instructions.

Note: this will also deploy OSS and NAS CSI driver. You may use configuration values to disable them.

Step 2: Create StorageClass

Storage class is necessary for dynamic volume provisioning. We already provided some predefined storage classes in the previous step. For more advanced features, please refer to Aliyun docs.

Step 3: Check the Status of CSI driver

Checks that all pods are running and ready.

kubectl get pods -n kube-system -l app=csi-plugin

Expected output:

NAME               READY   STATUS    RESTARTS   AGE
csi-plugin-jmxz8   4/4     Running   0          170m
kubectl get pods -n kube-system -l app=csi-provisioner

Expected output:

NAME                               READY   STATUS    RESTARTS   AGE
csi-provisioner-76fcb8b894-5gmc2   9/9     Running   0          7d8h
csi-provisioner-76fcb8b894-mlgj5   9/9     Running   0          7d8h

Step 4: Test the Deployment

To make sure your CSI plugin is working, create a simple workload to test it out:

kubectl apply -f examples/disk/workload.yaml

Now check that pod test-disk is running, a new disk is created, attached, formatted, and mounted into the new pod. After you are done, remove the test workload:

kubectl delete -f examples/disk/workload.yaml

Enjoy!