In Velero version 0.7.0 and later, you can run Velero in any namespace. To do so, you specify the namespace in the YAML files that configure the Velero server. You then also specify the namespace when you run Velero client commands.
The Velero release tarballs include a set of example configs that you can use to set up your Velero server. The
examples place the server and backup/schedule/restore/etc. data in the velero
namespace.
To run the server in another namespace, you edit the relevant files, changing velero
to
your desired namespace.
To store your backups, schedules, restores, and config in another namespace, you edit the relevant
files, changing velero
to your desired namespace. You also need to create the
cloud-credentials
secret in your desired namespace.
First, ensure you've downloaded & extracted the latest release.
Next, run velero install
for the YAML and edit the namespaces:
# velero install \
--bucket <BUCKET> \
--provider <PROVIDER> \
--dry-run \
--output yaml > velero-install.yaml
Finally, edit velero-install.yaml
and add change the namespace in the following 4 locations:
- Namespace.Name
- BackupStorageLocation.Namespace
- VolumeSnapshotLocation.Namespace
- Deployment.Namespace
To specify the namespace for all Velero client commands, run:
velero client config set namespace=<NAMESPACE_VALUE>