Skip to content
Azure file Container Storage Interface (CSI) Storage Plugin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

azurefile CSI driver for Kubernetes

TravisCI Coverage Status FOSSA Status

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 file volume, csi plugin name:

Project Status

Status: Aplha

Container Images & CSI Compatibility:

Azure File CSI Driver Version Image v0.3.0 v1.0.0
v0.1.0-alpha yes no
v0.2.0-alpha no yes
master branch no yes

Kubernetes Compatibility

Azure File CSI Driver\Kubernetes Version 1.12 1.13+
v0.1.0-alpha yes yes
v0.2.0-alpha no yes
master branch no yes

Driver parameters

Please refer to driver parameters

storage class parameters are compatible with built-in azurefile plugin


Install azurefile CSI driver on a kubernetes cluster

Please refer to install azurefile csi driver

E2E Usage example

1. create a pod with csi azurefile driver mount on linux

Option#1: Azurefile Dynamic Provisioning
  • Create an azurefile CSI storage class
kubectl create -f
  • Create an azurefile CSI PVC
kubectl create -f
Option#2: Azurefile Static Provisioning(use an existing azure file share)
  • Use kubectl create secret to create azure-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 an azurefile CSI PV, download pv-azurefile-csi.yaml file and edit sharename in volumeAttributes
vi pv-azurefile-csi.yaml
kubectl create -f pv-azurefile-csi.yaml
  • Create an azurefile CSI PVC which would be bound to the above PV
kubectl create -f

2. validate PVC status and create an nginx pod

  • make sure pvc is created and in Bound status finally
watch kubectl describe pvc pvc-azurefile
  • create a pod with azurefile CSI PVC
kubectl create -f

3. enter the pod container to do validation

  • watch the status of pod until its Status changed from Pending to Running and then enter the pod container
$ watch kubectl describe po nginx-azurefile
$ kubectl exec -it nginx-azurefile -- bash
root@nginx-azurefile:/# df -h
Filesystem                                                                                             Size  Used Avail Use% Mounted on
overlay                                                                                                 30G   19G   11G  65% /
tmpfs                                                                                                  3.5G     0  3.5G   0% /dev
//  1.0G   64K  1.0G   1% /mnt/azurefile

In the above example, there is a /mnt/azurefile directory mounted as dysk filesystem.

Kubernetes Development

Please refer to development guide


You can’t perform that action at this time.