Skip to content

Instantly share code, notes, and snippets.

@chrishenzie
Last active August 17, 2020 22:53
Show Gist options
  • Save chrishenzie/e5aa2c2e5f12d7b0bfba80181e7f61a0 to your computer and use it in GitHub Desktop.
Save chrishenzie/e5aa2c2e5f12d7b0bfba80181e7f61a0 to your computer and use it in GitHub Desktop.
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotClass
metadata:
name: ebs-csi
driver: ebs.csi.aws.com
deletionPolicy: Delete
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc
spec:
storageClassName: standard-rwo
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Pod
metadata:
name: hello-app
spec:
containers:
- name: hello-app
image: gcr.io/google-samples/hello-app:1.0
volumeMounts:
- name: pv
mountPath: /mount
volumes:
- name: pv
persistentVolumeClaim:
claimName: pvc
---
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshot
metadata:
name: snapshot
spec:
volumeSnapshotClassName: ebs-csi
source:
persistentVolumeClaimName: pvc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment