Created
March 5, 2018 20:13
-
-
Save ToroNZ/6ec50da9ba477fd64d2477e90e4bd913 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -o pipefail | |
export VOLUME=${volume:-24} | |
for i in $(seq 0 "$VOLUME"); do | |
volume_name="vol-${i}" | |
cat <<EOF | kubectl create -f - | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: "$volume_name" | |
spec: | |
capacity: | |
storage: 5Gi | |
accessModes: | |
- ReadWriteOnce | |
nfs: | |
server: support1.b49b.internal | |
path: /exports | |
persistentVolumeReclaimPolicy: Recycle | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment