Skip to content

Instantly share code, notes, and snippets.

@hermanho
Last active April 29, 2019 08:22
Show Gist options
  • Save hermanho/736f8074672a644fddddaeab438e7c68 to your computer and use it in GitHub Desktop.
Save hermanho/736f8074672a644fddddaeab438e7c68 to your computer and use it in GitHub Desktop.
Azure Kubernetes azureFile with Symlinks
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
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: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment