Skip to content

Commit

Permalink
Add static provisioning example to PowerFlex
Browse files Browse the repository at this point in the history
  • Loading branch information
falfaroc committed Aug 19, 2022
1 parent d02b473 commit 038b0ad
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions content/docs/csidriver/features/powerflex.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <systemID>-<volumeID> 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: <systemID>-<volumeID>
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

Expand Down

0 comments on commit 038b0ad

Please sign in to comment.