Example of NAS volume CSI
- Print
- PDF
Example of NAS volume CSI
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Available in VPC
This document shows examples of various volume assignment methods based on the CSI instructions explained in NAS volume CSI.
Mount one NAS volume to multiple pods to use
This example shows how to create a new NAS volume and mount it to 2 pods so that the volume is shared.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nas-csi-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 500Gi
storageClassName: nks-nas-csi
---
kind: Pod
apiVersion: v1
metadata:
name: my-csi-app-1
spec:
containers:
- name: my-frontend
image: busybox
volumeMounts:
- mountPath: "/data"
name: my-volume
command: [ "sleep", "1000000" ]
volumes:
- name: my-volume
persistentVolumeClaim:
claimName: nas-csi-pvc
---
apiVersion: v1
kind: Pod
metadata:
name: my-csi-app-2
spec:
containers:
- name: my-frontend
image: busybox
volumeMounts:
- mountPath: "/data"
name: my-volume
command: [ "sleep", "1000000" ]
volumes:
- name: my-volume
persistentVolumeClaim:
claimName: nas-csi-pvc
Was this article helpful?