You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist is a follow-up to the [CSI Integration blog post](https://velero.io/blog/csi-integration/0) on the Velero website.
Updates here include:
1. Using [`v0.1.2` release of `velero-plugin-for-csi`](https://github.com/vmware-tanzu/velero-plugin-for-csi/releases/tag/v0.1.2)
1. Using `[v1.1.1` release of `velero-plugin-for-microsoft-azure`](https://github.com/vmware-tanzu/velero-plugin-for-microsoft-azure/releases/tag/v1.1.1)
1. Using [`v1.5.2` release of Velero](https://github.com/vmware-tanzu/velero/releases/tag/v1.5.2)
Below are the updated set of instructions to
1. Create AKS cluster with kubernetes version v1.17 or later. In this example an AKS cluster running `v1.18.6` is used.
From [StorageClass](https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/deploy/example/storageclass-azuredisk-csi.yaml) and [VolumeSnapshotClass](https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/deploy/example/snapshot/storageclass-azuredisk-snapshot.yaml).
NOTE: The volumesnapshotclass was edited to add the `velero.io/csi-volumesnapshot-class: "true"` annotation.
1. Deploy a sample CSI app
```yaml
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: csi-app
---
kind: Pod
apiVersion: v1
metadata:
namespace: csi-app
name: csi-nginx
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- image: nginx
name: nginx
command: [ "sleep", "1000000" ]
volumeMounts:
- name: azuredisk01
mountPath: "/mnt/azuredisk"
volumes:
- name: azuredisk01
persistentVolumeClaim:
claimName: pvc-azuredisk
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: csi-app
name: pvc-azuredisk
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: disk.csi.azure.com
---
```
1. Make our sample app generate some data into the PV
Waiting forbackup to complete. You may safely press ctrl-c to stop waiting - your backup will continuein the background.
.......
Backup completed with status: Completed. You may check for more information using the commands `velero backup describe csi-b1` and `velero backup logs csi-b1`.
```
1. Describe the backup to confirm that the CSI volumesnapshots were included in the backup
Waiting forrestore to complete. You may safely press ctrl-c to stop waiting - your restore will continuein the background.
.
Restore completed with status: Completed. You may check for more information using the commands `velero restore describe csi-b1-20201029153424` and `velero restore logs csi-b1-20201029153424`.
```
1. Verify that the `csi-app` was restored completely with the data intact