Use the following command to create a PVC

kubectl apply -f <volume.yaml>

For example:

kubectl apply -f raid10-volume.yaml


For non-protected volumes, use a YAML such as this:

server:~/AKS_example$ cat raid0-volume.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
 name: block-pvc-r0
spec:
 accessModes:
   - ReadWriteMany
 volumeMode: Block
 resources:
   requests:
     storage: 10Gi
 storageClassName: nvmesh-raid0


The following example is for protected volumes:

server:~/AKS_example$ cat raid1-volume.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
 name: block-pvc
spec:
 accessModes:
   - ReadWriteMany
 volumeMode: Block
 resources:
   requests:
     storage: 10Gi
 storageClassName: nvmesh-raid1


The following example is for protected volumes with higher performance by using more drives in parallel:

server:~/AKS_example$ cat raid10-volume.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
 name: block-pvc-r10
spec:
 accessModes:
   - ReadWriteMany
 volumeMode: Block
 resources:
   requests:
     storage: 10Gi
 storageClassName: nvmesh-raid10


After creating one PVC of each of the examples, verification will show the following:

server:~/AKS_example$ kubectl get pvc
NAME                          STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS      AGE
backups-nvmesh-management-0   Bound     nvmesh-backup-0                            5Gi        RWO            default           43h
block-pvc                     Bound     pvc-632172ae-5ac9-49f3-8cba-e63edc283c2a   10Gi       RWX            nvmesh-raid1      40h
block-pvc-r0                  Bound     pvc-7fc781e7-e744-4f0e-bac2-ec272c964622   10Gi       RWX            nvmesh-raid0      23h
block-pvc-r10                 Bound     pvc-017fa85e-ce4c-4ff5-96a4-a02d0b1c2cc5   10Gi       RWX            nvmesh-raid10     23h
data-volume-mongo-0           Bound     data-volume-mongodb                        20Gi       RWO            default           43h

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment