Skip to content

Instantly share code, notes, and snippets.

@chukaofili
Last active November 1, 2019 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save chukaofili/920c8cab63fc9a14d12211adc766f299 to your computer and use it in GitHub Desktop.
Save chukaofili/920c8cab63fc9a14d12211adc766f299 to your computer and use it in GitHub Desktop.
DigitalOcean persistent volume exammple
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: [storageclass-name-goes-here]
---
apiVersion: v1
kind: Pod
metadata:
name: busy-pod
spec:
containers:
- command:
- /bin/sleep
- 7d
image: busybox
name: busy-container1
volumeMounts:
- mountPath: /mnt/pv-1
name: vol1
volumes:
- name: vol1
persistentVolumeClaim:
claimName: pv1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment