forked from kubernetes/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added azureFile mounting via PV/PVC, elaborated documentation slightly
- Loading branch information
1 parent
11aa742
commit 939a021
Showing
4 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: azure-2 | ||
spec: | ||
containers: | ||
- image: kubernetes/pause | ||
name: azure-2 | ||
volumeMounts: | ||
- name: azure | ||
mountPath: /mnt/azure | ||
volumes: | ||
- name: azure | ||
persistentVolumeClaim: | ||
claimName: storage-sample |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: sample-storage | ||
# The label is used for matching the exact claim | ||
labels: | ||
usage: sample-storage | ||
spec: | ||
capacity: | ||
storage: 10Gi | ||
accessModes: | ||
- ReadWriteMany | ||
persistentVolumeReclaimPolicy: Retain | ||
azureFile: | ||
# Replace with your secret name | ||
secretName: azure-secret | ||
# Replace with correct storage share name | ||
shareName: k8stest | ||
# In case the secret is stored in a different namespace | ||
#shareNamespace: default | ||
readOnly: false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: storage-sample | ||
# Set this annotation to NOT let Kubernetes automatically create | ||
# a persistent volume for this volume claim. | ||
annotations: | ||
volume.beta.kubernetes.io/storage-class: "" | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
selector: | ||
# To make sure we match the claim with the exact volume, match the label | ||
matchLabels: | ||
usage: storage-sample |