Skip to content

Commit 9b77edb

Browse files
authored
Merge pull request #160 from Kartik494/update-doc
Add support to all k8s versions for VolumeSnapshot
2 parents 39ef64d + ffe4d0b commit 9b77edb

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,16 @@ Since volume snapshot is an alpha feature starting in Kubernetes v1.12, you need
237237
After having created the `csi-pvc` as described in the example above,
238238
use the volume snapshot class to dynamically create a volume snapshot:
239239
240-
> $ kubectl apply -f examples/csi-snapshot.yaml
240+
> For Kubernetes < v1.17
241+
>
242+
> - `$ kubectl apply -f examples/csi-snapshot.yaml`
243+
>
244+
> For Kubernetes >= v1.17
245+
> - `$ kubectl apply -f examples/csi-snapshot-v1beta1.yaml`
241246
> ```
242247
> volumesnapshot.snapshot.storage.k8s.io/new-snapshot-demo created
243248
> ```
244-
>
249+
245250
>
246251
> $ kubectl get volumesnapshot
247252
> ```

examples/csi-snapshot-v1beta1.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: snapshot.storage.k8s.io/v1beta1
2+
kind: VolumeSnapshot
3+
metadata:
4+
name: new-snapshot-demo
5+
spec:
6+
volumeSnapshotClassName: csi-hostpath-snapclass
7+
source:
8+
persistentVolumeClaimName: csi-pvc

0 commit comments

Comments
 (0)