diff --git a/content/docs/csidriver/features/powerflex.md b/content/docs/csidriver/features/powerflex.md index cfc331a718..75c93cf6a5 100644 --- a/content/docs/csidriver/features/powerflex.md +++ b/content/docs/csidriver/features/powerflex.md @@ -522,6 +522,66 @@ Then run: this test deploys the pod with two ephemeral volumes, and write some data to them before deleting the pod. When creating ephemeral volumes, it is important to specify the following within the volumeAttributes section: volumeName, size, storagepool, and if you want to use a non-default array, systemID. +## Consuming Existing Volumes with Static Provisioning + +You can use existent volumes from PowerFlex array as Persistent Volumes in your Kubernetes, perform these steps: +1. Open your volume in the PowerFlex Management UI. Filter by just your volume and the volume ID can be located in the URL. +2. Keep track of your system ID and volume ID as they will be needed during this procedure. +3. Create PersistentVolume and use this volume ID in the volumeHandle with the format - in the manifest. Modify other parameters according to your needs. +```yaml +apiVersion: v1 +kind: PersistentVolume +metadata: + name: existingVol +spec: + capacity: + storage: 8Gi + csi: + driver: csi-vxflexos.dellemc.com + volumeHandle: - + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + storageClassName: vxflexos + + +``` +4. Create PersistentVolumeClaim to use this PersistentVolume. +```yaml +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: pvol +spec: + accessModes: + - ReadWriteOnce + volumeMode: Filesystem + resources: + requests: + storage: 8Gi + storageClassName: vxflexos + +``` +5. Then use this PVC as a volume in a pod. +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: static-prov-pod +spec: + containers: + - name: test + image: busybox + command: [ "sleep", "3600" ] + volumeMounts: + - mountPath: "/data0" + name: pvol + volumes: + - name: pvol + persistentVolumeClaim: + claimName: pvol +``` +6. After the pod is `Ready` and `Running`, you can start to use this pod and volume. ## Dynamic Logging Configuration