Installing Velero
Velero
- Protect your data from loss using a flexible backup system.
- Recover a Managed Service for Kubernetes cluster faster if it goes down.
- Transfer data across Managed Service for Kubernetes clusters.
Velero uses the Container Storage Interface driver to create backups and restore persistent volumes from Yandex Cloud disk snapshots.
Getting started
-
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter. -
Create a service account needed to access Yandex Object Storage.
yc iam service-account create --name <service_account_name>
-
Assign the service account the
storage.editor
role:yc resource-manager folder add-access-binding <folder_ID> \ --role storage.editor \ --subject serviceAccount:<service_account_ID>
-
Create a static access key for the service account in JSON format and save it to the
sa-key.json
file:yc iam access-key create \ --service-account-name=<service_account_name> \ --format=json > sa-key.json
Installation using Yandex Cloud Marketplace
- Go to the folder page
and select Managed Service for Kubernetes. - Click the Managed Service for Kubernetes cluster name and select the
Marketplace tab. - Under Applications available for installation, select Velero and click Use.
- Configure the application:
-
Namespace: Create a namespace called
velero
. The application uses it by default.Note
If you select a different namespace, you will have to specify its name in each command.
-
Application name: Enter a name for the application.
-
Object Storage static access key: Copy the contents of the
sa-key.json
file or create a new access key for the service account. The service account must have thestorage.editor
role. -
Object Storage bucket name: Specify the name of the Object Storage bucket.
-
- Click Install.
- Wait for the application to change its status to
Deployed
.
Installation using a Helm chart
-
Install Helm
v3.7.0 or higher. -
Install kubectl
and configure it to work with the created cluster. -
To install a Helm chart
with Velero, run this command:export HELM_EXPERIMENTAL_OCI=1 && \ helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/velero/velero \ --version 2.30.4-1 \ --untar && \ helm install \ --namespace velero \ --create-namespace \ --set configuration.backupStorageLocation.bucket=<bucket_name> \ --set-file serviceaccountawskeyvalue=<path_to_sa-key.json_file> \ velero ./velero/