Mounting Azure File Shares on AKS using the Azure Files volume type doesn’t enable support for symlinks. You can fix this with a very simple tweak.

Based on the discoveries of the great Lawrence Gripper, I recently discovered that a CIFS mount in Ubuntu is not enabling by default the support for symlinks.

Therefore, in order to mount an share with the symlink support you have to create a PersistentVolume like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
apiVersion: v1
kind: PersistentVolume
metadata:
  name: sample-symlinks
  labels:
    usage: sample-symlinks
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  #Really important to specify this mountOption
  mountOptions:
    - mfsymlinks
  azureFile:
    # Replace with your secret name containing azurestorageaccountname and azurestorageaccountkey
    secretName: azure-secret
    # Replace with correct Azure Files Share name
    shareName: damaggioshare
    readOnly: false

Have fun!