Last active
April 29, 2019 08:22
-
-
Save hermanho/736f8074672a644fddddaeab438e7c68 to your computer and use it in GitHub Desktop.
Azure Kubernetes azureFile with Symlinks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: test-app | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: test-app | |
| template: | |
| metadata: | |
| labels: | |
| app: test-app | |
| spec: | |
| containers: | |
| - name: stretch | |
| image: debian:stretch-slim | |
| volumeMounts: | |
| - name: azure | |
| mountPath: /testing | |
| subPath: testSubDir/testing | |
| volumes: | |
| - name: azure | |
| persistentVolumeClaim: | |
| claimName: pvc-azure-file-share | |
| readOnly: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: PersistentVolume | |
| metadata: | |
| name: pv-azure-file-share | |
| labels: | |
| pv-type: azure-file-share | |
| spec: | |
| capacity: | |
| storage: 100Mi | |
| accessModes: | |
| - ReadWriteMany | |
| persistentVolumeReclaimPolicy: Retain | |
| #Really important to specify this mountOption | |
| mountOptions: | |
| - mfsymlinks | |
| azureFile: | |
| secretName: azure-file-secret | |
| shareName: share1 | |
| readOnly: false | |
| --- | |
| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: pvc-azure-file-share | |
| spec: | |
| accessModes: | |
| - ReadWriteMany | |
| resources: | |
| requests: | |
| storage: 100Mi | |
| volumeName: pv-azure-file-share | |
| storageClassName: "" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ref
https://www.danielemaggio.eu/containers/azure-files-shares-with-symlinks-support-on-aks/