This driver allows Kubernetes to use azure-storage-fuse, csi plugin name: blobfuse.csi.azure.com
Status: Aplha
Blobfuse CSI Driver Version | Image | v1.0.0 |
---|---|---|
v0.1.0-alpha | mcr.microsoft.com/k8s/csi/blobfuse-csi:v0.1.0-alpha | yes |
master branch | mcr.microsoft.com/k8s/csi/blobfuse-csi:latest | yes |
Blobfuse CSI Driver\Kubernetes Version | 1.13+ |
---|---|
v0.1.0-alpha | yes |
master branch | yes |
Please refer to blobfuse.csi.azure.com
driver parameters
storage class
blobfuse.csi.azure.com
parameters are compatible with built-in blobfuse plugin
- The driver initialization depends on a Cloud provider config file, usually it's
/etc/kubernetes/azure.json
on all kubernetes nodes deployed by AKS or aks-engine, here is an azure.json example
if cluster is based on Managed Service Identity(MSI), make sure all agent nodes have
Contributor
role for current resource group
Please refer to install blobfuse csi driver
create a pod with blobfuse mount on linux
- Create a blobfuse CSI storage class
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/storageclass-blobfuse-csi-mountoptions.yaml
- Create a blobfuse CSI PVC
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pvc-blobfuse-csi.yaml
make sure the existing credentials in k8s cluster(e.g. service principal, msi) could access the specified storage account
- Download a blobfuse CSI storage class, edit
resourceGroup
,storageAccount
,containerName
in storage class
wget https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/storageclass-blobfuse-csi-existing-container.yaml
vi storageclass-blobfuse-csi-existing-container.yaml
kubectl create -f storageclass-blobfuse-csi-existing-container.yaml
- Create a blobfuse CSI PVC
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pvc-blobfuse-csi.yaml
- Use
kubectl create secret
to createazure-secret
with existing storage account name and key
kubectl create secret generic azure-secret --from-literal accountname=NAME --from-literal accountkey="KEY" --type=Opaque
- Create a blobfuse CSI PV, download
pv-blobfuse-csi.yaml
file and editcontainerName
involumeAttributes
wget https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pv-blobfuse-csi.yaml
vi pv-blobfuse-csi.yaml
kubectl create -f pv-blobfuse-csi.yaml
- Create a blobfuse CSI PVC which would be bound to the above PV
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pvc-blobfuse-csi-static.yaml
make sure pvc is created and in
Bound
status
watch kubectl describe pvc pvc-blobfuse
- create a pod with blobfuse CSI PVC
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/nginx-pod-blobfuse.yaml
- watch the status of pod until its Status changed from
Pending
toRunning
and then enter the pod container
$ watch kubectl describe po nginx-blobfuse
$ kubectl exec -it nginx-blobfuse -- bash
Filesystem Size Used Avail Use% Mounted on
...
blobfuse 30G 8.9G 21G 31% /mnt/blobfuse
/dev/sda1 30G 8.9G 21G 31% /etc/hosts
...
In the above example, there is a /mnt/blobfuse
directory mounted as dysk filesystem.
Please refer to development guide