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
64c2ab0a
Unverified
Commit
64c2ab0a
authored
Sep 02, 2019
by
Shuwei Hao
Committed by
GitHub
Sep 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10 from AliyunContainerService/bugfix/examples-update
update examples and readme file
parents
32b48cc3
f7cf9ba9
Show 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 @
64c2ab0a
...
...
@@ -149,7 +149,7 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
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:
...
...
@@ -157,32 +157,29 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
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
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
```
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:
```
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:
`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
...
...
examples/with-pv.yaml
View file @
64c2ab0a
...
...
@@ -22,33 +22,8 @@ metadata:
---
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
metadata
:
annotations
:
pv.kubernetes.io/bind-completed
:
"
yes"
pv.kubernetes.io/bound-by-controller
:
"
yes"
name
:
nginx-logs
namespace
:
nginx-example
spec
:
...
...
@@ -57,11 +32,7 @@ spec:
resources
:
requests
:
storage
:
20Gi
selector
:
matchLabels
:
alicloud-pvname
:
<PV_NAME>
storageClassName
:
disk
volumeName
:
<PV_NAME>
storageClassName
:
alicloud-disk-ssd
---
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