Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
velero-plugin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
velero-plugin
Commits
f7cf9ba9
Commit
f7cf9ba9
authored
Sep 02, 2019
by
流生
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update examples and readme file
parent
32b48cc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
37 deletions
+5
-37
README.md
+4
-7
examples/with-pv.yaml
+1
-30
No files found.
README.md
View file @
f7cf9ba9
...
@@ -149,7 +149,7 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
...
@@ -149,7 +149,7 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
Create a backup:
Create a backup:
`velero backup create nginx-backup --include-namespaces nginx-example`
`velero backup create nginx-backup --include-namespaces nginx-example
--wait
`
Destroy the nginx example:
Destroy the nginx example:
...
@@ -157,32 +157,29 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
...
@@ -157,32 +157,29 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
Create a restore from nginx-backup:
Create a restore from nginx-backup:
`velero restore create --from-backup nginx-backup`
`velero restore create --from-backup nginx-backup
--wait
`
2.
nginx example with persistent volumes
2.
nginx example with persistent volumes
Run the following command to create a nginx example with persistent volumes:
Run the following command to create a nginx example with persistent volumes:
```
```
VOLUME_ID=<YOUR_ECS_DISK_ID>
sed -i "s#<PV_NAME>#$VOLUME_ID#" examples/with-pv.yaml
kubectl apply -f examples/with-pv.yaml
kubectl apply -f examples/with-pv.yaml
```
```
Create a backup:
Create a backup:
`velero backup create nginx-backup-volume --
snapshot-volumes --include-namespaces nginx-example
`
`velero backup create nginx-backup-volume --
include-namespaces nginx-example --wait
`
Destroy the nginx example:
Destroy the nginx example:
```
```
kubectl delete namespaces nginx-example
kubectl delete namespaces nginx-example
kubectl delete pv $(kubectl get pv|grep nginx-example/nginx-logs|cut -d ' ' -f1)
```
```
Create a restore from nginx-backup-volume:
Create a restore from nginx-backup-volume:
`velero restore create --from-backup nginx-backup-volume --
restore-volumes
`
`velero restore create --from-backup nginx-backup-volume --
wait
`
[
14
]:
https://www.alibabacloud.com/help/doc-detail/28645.htm
[
14
]:
https://www.alibabacloud.com/help/doc-detail/28645.htm
...
...
examples/with-pv.yaml
View file @
f7cf9ba9
...
@@ -22,33 +22,8 @@ metadata:
...
@@ -22,33 +22,8 @@ metadata:
---
---
apiVersion
:
v1
apiVersion
:
v1
kind
:
PersistentVolume
metadata
:
annotations
:
pv.kubernetes.io/bound-by-controller
:
"
yes"
labels
:
alicloud-pvname
:
<PV_NAME>
name
:
<PV_NAME>
namespace
:
nginx-example
spec
:
accessModes
:
-
ReadWriteOnce
capacity
:
storage
:
20Gi
flexVolume
:
driver
:
alicloud/disk
fsType
:
ext4
options
:
volumeId
:
<PV_NAME>
storageClassName
:
disk
---
apiVersion
:
v1
kind
:
PersistentVolumeClaim
kind
:
PersistentVolumeClaim
metadata
:
metadata
:
annotations
:
pv.kubernetes.io/bind-completed
:
"
yes"
pv.kubernetes.io/bound-by-controller
:
"
yes"
name
:
nginx-logs
name
:
nginx-logs
namespace
:
nginx-example
namespace
:
nginx-example
spec
:
spec
:
...
@@ -57,11 +32,7 @@ spec:
...
@@ -57,11 +32,7 @@ spec:
resources
:
resources
:
requests
:
requests
:
storage
:
20Gi
storage
:
20Gi
selector
:
storageClassName
:
alicloud-disk-ssd
matchLabels
:
alicloud-pvname
:
<PV_NAME>
storageClassName
:
disk
volumeName
:
<PV_NAME>
---
---
apiVersion
:
apps/v1beta1
apiVersion
:
apps/v1beta1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment