This section outlines the steps to request storage resources from PowerStore systems.
- Create YAML files for PVCs.
The following are examples of PowerStore block storage and NFS storage.
PersistentVolumeClaim for PowerStore block storage
---
apiVersion: v1
kind: Namespace
metadata:
name: mysql-powerstore
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: mysql-powerstore-vol0
namespace: mysql-powerstore
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 50Gi
storageClassName: powerstore-xfs-ps6
- The PVC requests a 50Gb volume with a ReadWriteOnce access mode.
- By using the powerstore-xfs-ps6 storage class, the PV will be a block volume from the PowerStore system using the iSCSI protocol.
PersistentVolumeClaim for PowerStore NFS storage
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: mysql-powerstore-vol1
namespace: mysql-powerstore
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 30Gi
storageClassName: powerstore-nfs-ps6
- This PVC specifies a 30Gb volume using the powerstore-nfs-ps6 storage class. This means that the volume will be provisioned on the PowerStore NAS server.
- Navigate to Cluster-Name > Storage > PersistentVolumeClaims and use the Import YAML function to upload the YAML files. Click Import to begin creating the PVCs.
- After successful completion, Rancher displays information for both PVCs.
- The PVCs show a Bound status, indicating that Kubernetes successfully matched them with suitable PVs. Figure 21.
- The Storage > PersistentVolumes section also shows the two PVs bound to the PVCs. Figure 22.
- To locate the two Persistent Volumes on the PowerStore system, access the PowerStore Manager UI. For block volumes, navigate to Storage > Volumes. For NAS files, navigate to Storage > File Systems. See Figure 23 and Figure 24.
Figure 21. PersistentVolumeClaims in Rancher
Figure 22. PersistentVolumes in Rancher
Figure 23. Persistent Volume on PowerStore system using block protocol
Figure 24. Persistent Volume on PowerStore system using NFS procotol