Testing Kubernetes with Azure Files Premium

Howdy,

I got into limited public preview of Azure Files premium just to test it with Kubernetes. Appears its not that straight forward as you would like it to be :)

It doesnt really work yet, unless you prestage the storage account and you have to use PVC size 100gib or more (Azure File premium limitation). Example:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: azure-premium-files-rwx-delete
provisioner: kubernetes.io/azure-file
mountOptions:
  - dir_mode=0777
  - file_mode=0777
  - uid=1000
  - gid=1000
reclaimPolicy: Retain
parameters:
  skuName: Standard_LRS << has to be this for now
  storageAccount: azurefilespremium << prestage this account

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: azurefile
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: azure-premium-files-rwx-delete
  resources:
    requests:
      storage: 100Gi

There is a PR (already) to make Azure Files premium work properly.

Happy deploying!

Written on July 24, 2018