Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save luebken/928acf17eadb557f6413882e220abbc3 to your computer and use it in GitHub Desktop.
Save luebken/928acf17eadb557f6413882e220abbc3 to your computer and use it in GitHub Desktop.
oc login -u system:admin
cat <<-EOF > /Users/mdl/tmp/pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv0001
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
hostPath:
path: /Users/mdl/.oc/volumes/pv0001
EOF
for i in `seq -w 0001 0010`; do SHARE=pv$i; mkdir -p $SHARE; chmod 777 $SHARE; sed s/pv0001/pv$i/g /Users/mdl/tmp/pv.yaml | oc create -f - --as=system:admin; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment