Example of NAS volume CSI
    • PDF

    Example of NAS volume CSI

    • PDF

    Article Summary

    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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.