diff --git a/README.md b/README.md index 71e57e598..1a40bed27 100644 --- a/README.md +++ b/README.md @@ -237,11 +237,16 @@ Since volume snapshot is an alpha feature starting in Kubernetes v1.12, you need After having created the `csi-pvc` as described in the example above, use the volume snapshot class to dynamically create a volume snapshot: -> $ kubectl apply -f examples/csi-snapshot.yaml +> For Kubernetes < v1.17 +> +> - `$ kubectl apply -f examples/csi-snapshot.yaml` +> +> For Kubernetes >= v1.17 +> - `$ kubectl apply -f examples/csi-snapshot-v1beta1.yaml` > ``` > volumesnapshot.snapshot.storage.k8s.io/new-snapshot-demo created > ``` -> + > > $ kubectl get volumesnapshot > ``` diff --git a/examples/csi-snapshot-v1beta1.yaml b/examples/csi-snapshot-v1beta1.yaml new file mode 100644 index 000000000..a27e4dda1 --- /dev/null +++ b/examples/csi-snapshot-v1beta1.yaml @@ -0,0 +1,8 @@ +apiVersion: snapshot.storage.k8s.io/v1beta1 +kind: VolumeSnapshot +metadata: + name: new-snapshot-demo +spec: + volumeSnapshotClassName: csi-hostpath-snapclass + source: + persistentVolumeClaimName: csi-pvc \ No newline at end of file