Created
July 3, 2020 11:27
-
-
Save grdnrio/af971e10ff89779df17e190b19df3cf5 to your computer and use it in GitHub Desktop.
RWM + RO example
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
kind: StorageClass | |
apiVersion: storage.k8s.io/v1 | |
metadata: | |
name: px-sharedv4-sc | |
provisioner: kubernetes.io/portworx-volume | |
parameters: | |
repl: "2" | |
sharedv4: "true" | |
--- | |
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: px-sharedv4-pvc | |
annotations: | |
volume.beta.kubernetes.io/storage-class: px-sharedv4-sc | |
spec: | |
accessModes: | |
- ReadWriteMany | |
resources: | |
requests: | |
storage: 10Gi | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod1 | |
spec: | |
containers: | |
- name: test-container | |
image: nginx | |
volumeMounts: | |
- name: test-volume | |
mountPath: /test-portworx-volume | |
volumes: | |
- name: test-volume | |
persistentVolumeClaim: | |
claimName: px-sharedv4-pvc | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod2 | |
spec: | |
containers: | |
- name: test-container-ro | |
image: nginx | |
volumeMounts: | |
- name: test-volume | |
mountPath: /test-portworx-volume | |
volumes: | |
- name: test-volume | |
persistentVolumeClaim: | |
claimName: px-sharedv4-pvc | |
readOnly: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment