WARNING: This driver is in ALPHA currently. Do NOT use this driver in a production environment in its current state.
This driver allows Kubernetes to use azure disk volume, csi plugin name: disk.csi.azure.com
Status: Alpha
Azure Disk CSI Driver Version | Image | v0.3.0 | v1.0.0 |
---|---|---|---|
v0.1.0-alpha | mcr.microsoft.com/k8s/csi/azuredisk-csi:v0.1.0-alpha | yes | no |
v0.2.0-alpha | mcr.microsoft.com/k8s/csi/azuredisk-csi:v0.2.0-alpha | no | yes |
master branch | mcr.microsoft.com/k8s/csi/azuredisk-csi:latest | no | yes |
Azure Disk CSI Driver\Kubernetes Version | 1.12 | 1.13+ |
---|---|---|
v0.1.0-alpha | yes | yes |
v0.2.0-alpha | no | yes |
master branch | no | yes |
Please refer to disk.csi.azure.com
driver parameters
storage class
disk.csi.azure.com
parameters are compatible with built-in azuredisk plugin
- The driver initialization depends on a Cloud provider config file, usually it's
/etc/kubernetes/azure.json
on all k8s nodes deployed by AKS or aks-engine, here is an azure.json example
Please refer to install azuredisk csi driver
- Create an azuredisk CSI storage class
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/deploy/example/storageclass-azuredisk-csi.yaml
- Create an azuredisk CSI PVC
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/deploy/example/pvc-azuredisk-csi.yaml
- Create an azuredisk CSI PV, download
pv-azuredisk-csi.yaml
file and editdiskName
,diskURI
involumeAttributes
wget https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/deploy/example/pv-azuredisk-csi.yaml
vi pv-azuredisk-csi.yaml
kubectl create -f pv-azuredisk-csi.yaml
- Create an azuredisk CSI PVC which would be bound to the above PV
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/deploy/example/pvc-azuredisk-csi-static.yaml
- make sure pvc is created and in
Bound
status finally
watch kubectl describe pvc pvc-azuredisk
- create a pod with azuredisk CSI PVC
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/deploy/example/nginx-pod-azuredisk.yaml
- watch the status of pod until its Status changed from
Pending
toRunning
and then enter the pod container
$ watch kubectl describe po nginx-azuredisk
$ kubectl exec -it nginx-azuredisk -- bash
Filesystem Size Used Avail Use% Mounted on
overlay 30G 15G 15G 52% /
...
/devhost/sdc 9.8G 37M 9.8G 1% /mnt/azuredisk
...
In the above example, there is a /mnt/azuredisk
directory mounted as disk filesystem.
Please refer to development guide