Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandr Stefurishin <alexandr.stefurishin@flant.com>
  • Loading branch information
Alexandr Stefurishin committed Dec 2, 2024
1 parent d92526a commit 192053d
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,56 @@ while [[ $kubectl_completed_check -eq 0 ]]; do
kubectl_completed_check=`kubectl -n $ns get pods | grep migrate-pv-$src | grep "Completed" | wc -l`
done
echo "Data migration completed"
```
```

## How to Create Volume Snapshots?

You can read more about snapshots [here](https://kubernetes.io/docs/concepts/storage/volume-snapshots/).

### Step 1: Enabling the snapshot-controller

First, you need to enable the snapshot-controller:

```shell
kubectl apply -f -<<EOF
apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
name: snapshot-controller
spec:
enabled: true
version: 1
EOF

```

### Step 2: Creating a Volume Snapshot

Now you can create volume snapshots. To do this, execute the following command with the necessary parameters:

```shell
kubectl apply -f -<<EOF
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: my-snapshot
namespace: <name of the namespace where the PVC is located>
spec:
volumeSnapshotClassName: sds-local-volume-snapshot-class
source:
persistentVolumeClaimName: <name of the PVC to snapshot>
EOF
```

Note that `sds-local-volume-snapshot-class` is created automatically, and it's `deletionPolicy` is `Delete`, which means that `VolumeSnapshotContent` should be deleted when its bound `VolumeSnapshot` is deleted.


### Step 3: Checking the Snapshot Status

To check the status of the created snapshot, execute the command:

```shell
kubectl get volumesnapshot
```

This command will display a list of all snapshots and their current status.

0 comments on commit 192053d

Please sign in to comment.