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.
Disk Snapshot: disk-snapshot
Block Volumes: disk-block
Resize Volume: disk-shared
- Authorizations to access related cloud resources
- StorageClass with
diskplugin.csi.alibabacloud.com
as provisioner name. - Service Accounts with required RBAC permissions
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.
- A working Kubernetes cluster deployed on ECS.
- Local
kubectl
configured to communicate with this cluster.
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.
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.
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
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!