Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JonathanBowker/5ba8bb16301b954075fc85c0c4ef2a6a to your computer and use it in GitHub Desktop.
Save JonathanBowker/5ba8bb16301b954075fc85c0c4ef2a6a 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