Skip to content

Commit bea46e3

Browse files
authored
Merge pull request #8822 from Lyndon-Li/1.16-doc
Add 1.16 doc
2 parents 3569ccc + b9fd3e4 commit bea46e3

88 files changed

Lines changed: 9662 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

site/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ params:
1515
latest: v1.15
1616
versions:
1717
- main
18+
- v1.16
1819
- v1.15
1920
- v1.14
2021
- v1.13

site/content/docs/v1.16/_index.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
toc: "false"
3+
cascade:
4+
version: v1.16
5+
toc: "true"
6+
---
7+
![100]
8+
9+
[![Build Status][1]][2]
10+
11+
## Overview
12+
13+
Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. You can run Velero with a cloud provider or on-premises. Velero lets you:
14+
15+
* Take backups of your cluster and restore in case of loss.
16+
* Migrate cluster resources to other clusters.
17+
* Replicate your production cluster to development and testing clusters.
18+
19+
Velero consists of:
20+
21+
* A server that runs on your cluster
22+
* A command-line client that runs locally
23+
24+
## Documentation
25+
26+
This site is our documentation home with installation instructions, plus information about customizing Velero for your needs, architecture, extending Velero, contributing to Velero and more.
27+
28+
Please use the version selector at the top of the site to ensure you are using the appropriate documentation for your version of Velero.
29+
30+
## Troubleshooting
31+
32+
If you encounter issues, review the [troubleshooting docs][30], [file an issue][4], or talk to us on the [#velero-users channel][25] on the Kubernetes Slack server.
33+
34+
## Contributing
35+
36+
If you are ready to jump in and test, add code, or help with documentation, follow the instructions on our [Start contributing](https://velero.io/docs/v1.16.0/start-contributing/) documentation for guidance on how to setup Velero for development.
37+
38+
## Changelog
39+
40+
See [the list of releases][6] to find out about feature changes.
41+
42+
[1]: https://github.com/vmware-tanzu/velero/workflows/Main%20CI/badge.svg
43+
[2]: https://github.com/vmware-tanzu/velero/actions?query=workflow%3A"Main+CI"
44+
45+
[4]: https://github.com/vmware-tanzu/velero/issues
46+
[6]: https://github.com/vmware-tanzu/velero/releases
47+
48+
[9]: https://kubernetes.io/docs/setup/
49+
[10]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-with-homebrew-on-macos
50+
[11]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#tabset-1
51+
[12]: https://github.com/kubernetes/kubernetes/blob/main/cluster/addons/dns/README.md
52+
[14]: https://github.com/kubernetes/kubernetes
53+
[24]: https://groups.google.com/forum/#!forum/projectvelero
54+
[25]: https://kubernetes.slack.com/messages/velero-users
55+
56+
[30]: troubleshooting.md
57+
58+
[100]: img/velero.png
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "Table of Contents"
3+
layout: docs
4+
---
5+
6+
## API types
7+
8+
Here we list the API types that have some functionality that you can only configure via json/yaml vs the `velero` cli
9+
(hooks)
10+
11+
* [Backup][1]
12+
* [Restore][2]
13+
* [Schedule][3]
14+
* [BackupStorageLocation][4]
15+
* [VolumeSnapshotLocation][5]
16+
17+
[1]: backup.md
18+
[2]: restore.md
19+
[3]: schedule.md
20+
[4]: backupstoragelocation.md
21+
[5]: volumesnapshotlocation.md
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: docs
3+
title: API types
4+
---
5+
6+
Here's a list the API types that have some functionality that you can only configure via json/yaml vs the `velero` cli
7+
(hooks)
8+
9+
* [Backup][1]
10+
* [Restore][2]
11+
* [Schedule][3]
12+
* [BackupStorageLocation][4]
13+
* [VolumeSnapshotLocation][5]
14+
15+
[1]: backup.md
16+
[2]: restore.md
17+
[3]: schedule.md
18+
[4]: backupstoragelocation.md
19+
[5]: volumesnapshotlocation.md
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
---
2+
title: "Backup API Type"
3+
layout: docs
4+
---
5+
6+
## Use
7+
8+
Use the `Backup` API type to request the Velero server to perform a backup. Once created, the
9+
Velero Server immediately starts the backup process.
10+
11+
## API GroupVersion
12+
13+
Backup belongs to the API group version `velero.io/v1`.
14+
15+
## Definition
16+
17+
Here is a sample `Backup` object with each of the fields documented:
18+
19+
```yaml
20+
# Standard Kubernetes API Version declaration. Required.
21+
apiVersion: velero.io/v1
22+
# Standard Kubernetes Kind declaration. Required.
23+
kind: Backup
24+
# Standard Kubernetes metadata. Required.
25+
metadata:
26+
# Backup name. May be any valid Kubernetes object name. Required.
27+
name: a
28+
# Backup namespace. Must be the namespace of the Velero server. Required.
29+
namespace: velero
30+
# Parameters about the backup. Required.
31+
spec:
32+
# CSISnapshotTimeout specifies the time used to wait for
33+
# CSI VolumeSnapshot status turns to ReadyToUse during creation, before
34+
# returning error as timeout. The default value is 10 minute.
35+
csiSnapshotTimeout: 10m
36+
# ItemOperationTimeout specifies the time used to wait for
37+
# asynchronous BackupItemAction operations
38+
# The default value is 4 hour.
39+
itemOperationTimeout: 4h
40+
# resourcePolicy specifies the referenced resource policies that backup should follow
41+
# optional
42+
resourcePolicy:
43+
kind: configmap
44+
name: resource-policy-configmap
45+
# Array of namespaces to include in the backup. If unspecified, all namespaces are included.
46+
# Optional.
47+
includedNamespaces:
48+
- '*'
49+
# Array of namespaces to exclude from the backup. Optional.
50+
excludedNamespaces:
51+
- some-namespace
52+
# Array of resources to include in the backup. Resources may be shortcuts (for example 'po' for 'pods')
53+
# or fully-qualified. If unspecified, all resources are included. Optional.
54+
includedResources:
55+
- '*'
56+
# Array of resources to exclude from the backup. Resources may be shortcuts (for example 'po' for 'pods')
57+
# or fully-qualified. Optional.
58+
excludedResources:
59+
- storageclasses.storage.k8s.io
60+
# Order of the resources to be collected during the backup process. It's a map with key being the plural resource
61+
# name, and the value being a list of object names separated by comma. Each resource name has format "namespace/objectname".
62+
# For cluster resources, simply use "objectname". Optional
63+
orderedResources:
64+
pods: mysql/mysql-cluster-replica-0,mysql/mysql-cluster-replica-1,mysql/mysql-cluster-source-0
65+
persistentvolumes: pvc-87ae0832-18fd-4f40-a2a4-5ed4242680c4,pvc-63be1bb0-90f5-4629-a7db-b8ce61ee29b3
66+
# Whether to include cluster-scoped resources. Valid values are true, false, and
67+
# null/unset. If true, all cluster-scoped resources are included (subject to included/excluded
68+
# resources and the label selector). If false, no cluster-scoped resources are included. If unset,
69+
# all cluster-scoped resources are included if and only if all namespaces are included and there are
70+
# no excluded namespaces. Otherwise, if there is at least one namespace specified in either
71+
# includedNamespaces or excludedNamespaces, then the only cluster-scoped resources that are backed
72+
# up are those associated with namespace-scoped resources included in the backup. For example, if a
73+
# PersistentVolumeClaim is included in the backup, its associated PersistentVolume (which is
74+
# cluster-scoped) would also be backed up.
75+
includeClusterResources: null
76+
# Array of cluster-scoped resources to exclude from the backup. Resources may be shortcuts
77+
# (for example 'sc' for 'storageclasses'), or fully-qualified. If unspecified,
78+
# no additional cluster-scoped resources are excluded. Optional.
79+
# Cannot work with include-resources, exclude-resources and include-cluster-resources.
80+
excludedClusterScopedResources: {}
81+
# Array of cluster-scoped resources to include from the backup. Resources may be shortcuts
82+
# (for example 'sc' for 'storageclasses'), or fully-qualified. If unspecified,
83+
# no additional cluster-scoped resources are included. Optional.
84+
# Cannot work with include-resources, exclude-resources and include-cluster-resources.
85+
includedClusterScopedResources: {}
86+
# Array of namespace-scoped resources to exclude from the backup. Resources may be shortcuts
87+
# (for example 'cm' for 'configmaps'), or fully-qualified. If unspecified,
88+
# no namespace-scoped resources are excluded. Optional.
89+
# Cannot work with include-resources, exclude-resources and include-cluster-resources.
90+
excludedNamespaceScopedResources: {}
91+
# Array of namespace-scoped resources to include from the backup. Resources may be shortcuts
92+
# (for example 'cm' for 'configmaps'), or fully-qualified. If unspecified,
93+
# all namespace-scoped resources are included. Optional.
94+
# Cannot work with include-resources, exclude-resources and include-cluster-resources.
95+
includedNamespaceScopedResources: {}
96+
# Individual objects must match this label selector to be included in the backup. Optional.
97+
labelSelector:
98+
matchLabels:
99+
app: velero
100+
component: server
101+
# Individual object when matched with any of the label selector specified in the set are to be included in the backup. Optional.
102+
# orLabelSelectors as well as labelSelector cannot co-exist, only one of them can be specified in the backup request
103+
orLabelSelectors:
104+
- matchLabels:
105+
app: velero
106+
- matchLabels:
107+
app: data-protection
108+
# Whether or not to snapshot volumes. Valid values are true, false, and null/unset. If unset, Velero performs snapshots as long as
109+
# a persistent volume provider is configured for Velero.
110+
snapshotVolumes: null
111+
# Where to store the tarball and logs.
112+
storageLocation: aws-primary
113+
# The list of locations in which to store volume snapshots created for this backup.
114+
volumeSnapshotLocations:
115+
- aws-primary
116+
- gcp-primary
117+
# The amount of time before this backup is eligible for garbage collection. If not specified,
118+
# a default value of 30 days will be used. The default can be configured on the velero server
119+
# by passing the flag --default-backup-ttl.
120+
ttl: 24h0m0s
121+
# whether pod volume file system backup should be used for all volumes by default.
122+
defaultVolumesToFsBackup: true
123+
# Whether snapshot data should be moved. If set, data movement is launched after the snapshot is created.
124+
snapshotMoveData: true
125+
# The data mover to be used by the backup. If the value is "" or "velero", the built-in data mover will be used.
126+
datamover: velero
127+
# UploaderConfig specifies the configuration for the uploader
128+
uploaderConfig:
129+
# ParallelFilesUpload is the number of files parallel uploads to perform when using the uploader.
130+
parallelFilesUpload: 10
131+
# Actions to perform at different times during a backup. The only hook supported is
132+
# executing a command in a container in a pod using the pod exec API. Optional.
133+
hooks:
134+
# Array of hooks that are applicable to specific resources. Optional.
135+
resources:
136+
-
137+
# Name of the hook. Will be displayed in backup log.
138+
name: my-hook
139+
# Array of namespaces to which this hook applies. If unspecified, the hook applies to all
140+
# namespaces. Optional.
141+
includedNamespaces:
142+
- '*'
143+
# Array of namespaces to which this hook does not apply. Optional.
144+
excludedNamespaces:
145+
- some-namespace
146+
# Array of resources to which this hook applies. The only resource supported at this time is
147+
# pods.
148+
includedResources:
149+
- pods
150+
# Array of resources to which this hook does not apply. Optional.
151+
excludedResources: []
152+
# This hook only applies to objects matching this label selector. Optional.
153+
labelSelector:
154+
matchLabels:
155+
app: velero
156+
component: server
157+
# An array of hooks to run before executing custom actions. Only "exec" hooks are supported.
158+
pre:
159+
-
160+
# The type of hook. This must be "exec".
161+
exec:
162+
# The name of the container where the command will be executed. If unspecified, the
163+
# first container in the pod will be used. Optional.
164+
container: my-container
165+
# The command to execute, specified as an array. Required.
166+
command:
167+
- /bin/uname
168+
- -a
169+
# How to handle an error executing the command. Valid values are Fail and Continue.
170+
# Defaults to Fail. Optional.
171+
onError: Fail
172+
# How long to wait for the command to finish executing. Defaults to 30 seconds. Optional.
173+
timeout: 10s
174+
# An array of hooks to run after all custom actions and additional items have been
175+
# processed. Only "exec" hooks are supported.
176+
post:
177+
# Same content as pre above.
178+
# Status about the Backup. Users should not set any data here.
179+
status:
180+
# The version of this Backup. The only version supported is 1.
181+
version: 1
182+
# The date and time when the Backup is eligible for garbage collection.
183+
expiration: null
184+
# The current phase.
185+
# Valid values are New, FailedValidation, InProgress, WaitingForPluginOperations,
186+
# WaitingForPluginOperationsPartiallyFailed, FinalizingafterPluginOperations,
187+
# FinalizingPartiallyFailed, Completed, PartiallyFailed, Failed.
188+
phase: ""
189+
# An array of any validation errors encountered.
190+
validationErrors: null
191+
# Date/time when the backup started being processed.
192+
startTimestamp: 2019-04-29T15:58:43Z
193+
# Date/time when the backup finished being processed.
194+
completionTimestamp: 2019-04-29T15:58:56Z
195+
# Number of volume snapshots that Velero tried to create for this backup.
196+
volumeSnapshotsAttempted: 2
197+
# Number of volume snapshots that Velero successfully created for this backup.
198+
volumeSnapshotsCompleted: 1
199+
# Number of attempted BackupItemAction operations for this backup.
200+
backupItemOperationsAttempted: 2
201+
# Number of BackupItemAction operations that Velero successfully completed for this backup.
202+
backupItemOperationsCompleted: 1
203+
# Number of BackupItemAction operations that ended in failure for this backup.
204+
backupItemOperationsFailed: 0
205+
# Number of warnings that were logged by the backup.
206+
warnings: 2
207+
# Number of errors that were logged by the backup.
208+
errors: 0
209+
# An error that caused the entire backup to fail.
210+
failureReason: ""
211+
```
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Velero Backup Storage Locations"
3+
layout: docs
4+
---
5+
6+
## Backup Storage Location
7+
8+
Velero can store backups in a number of locations. These are represented in the cluster via the `BackupStorageLocation` CRD.
9+
10+
Velero must have at least one `BackupStorageLocation`. By default, this is expected to be named `default`, however the name can be changed by specifying `--default-backup-storage-location` on `velero server`. Backups that do not explicitly specify a storage location will be saved to this `BackupStorageLocation`.
11+
12+
A sample YAML `BackupStorageLocation` looks like the following:
13+
14+
```yaml
15+
apiVersion: velero.io/v1
16+
kind: BackupStorageLocation
17+
metadata:
18+
name: default
19+
namespace: velero
20+
spec:
21+
backupSyncPeriod: 2m0s
22+
provider: aws
23+
objectStorage:
24+
bucket: myBucket
25+
credential:
26+
name: secret-name
27+
key: key-in-secret
28+
config:
29+
region: us-west-2
30+
profile: "default"
31+
```
32+
33+
### Parameter Reference
34+
35+
The configurable parameters are as follows:
36+
37+
#### Main config parameters
38+
39+
{{< table caption="Main config parameters" >}}
40+
| Key | Type | Default | Meaning |
41+
| --- | --- | --- | --- |
42+
| `provider` | String | Required Field | The name for whichever object storage provider will be used to store the backups. See [your object storage provider's plugin documentation](../supported-providers) for the appropriate value to use. |
43+
| `objectStorage` | ObjectStorageLocation | Required Field | Specification of the object storage for the given provider. |
44+
| `objectStorage/bucket` | String | Required Field | The storage bucket where backups are to be uploaded. |
45+
| `objectStorage/prefix` | String | Optional Field | The directory inside a storage bucket where backups are to be uploaded. |
46+
| `objectStorage/caCert` | String | Optional Field | A base64 encoded CA bundle to be used when verifying TLS connections |
47+
| `config` | map[string]string | None (Optional) | Provider-specific configuration keys/values to be passed to the object store plugin. See [your object storage provider's plugin documentation](../supported-providers) for details. |
48+
| `accessMode` | String | `ReadWrite` | How Velero can access the backup storage location. Valid values are `ReadWrite`, `ReadOnly`. |
49+
| `backupSyncPeriod` | metav1.Duration | Optional Field | How frequently Velero should synchronize backups in object storage. Default is Velero's server backup sync period. Set this to `0s` to disable sync. |
50+
| `validationFrequency` | metav1.Duration | Optional Field | How frequently Velero should validate the object storage . Default is Velero's server validation frequency. Set this to `0s` to disable validation. Default 1 minute. |
51+
| `credential` | [corev1.SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#secretkeyselector-v1-core) | Optional Field | The credential information to be used with this location. |
52+
| `credential/name` | String | Optional Field | The name of the secret within the Velero namespace which contains the credential information. |
53+
| `credential/key` | String | Optional Field | The key to use within the secret. |
54+
{{< /table >}}

0 commit comments

Comments
 (0)