-
Notifications
You must be signed in to change notification settings - Fork 13
docs: Update Velero documentation (#319) #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
orcsin
wants to merge
1
commit into
KubeRocketCI:main
Choose a base branch
from
orcsin:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
docs/operator-guide/disaster-recovery/install-velero-add-ons.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| --- | ||
| title: "Install Velero" | ||
| description: "Learn how to install Velero for Kubernetes backup, recovery, and migration, covering installation steps, AWS plugin configuration, and basic commands for backup and restore." | ||
| sidebar_label: "Install Velero" | ||
| --- | ||
| <!-- markdownlint-disable MD025 --> | ||
|
|
||
| # Automated Kubernetes Backup and Restore Workflows With Velero | ||
|
|
||
| <head> | ||
| <link rel="canonical" href="https://docs.kuberocketci.io/docs/operator-guide/disaster-recovery/install-velero-add-ons" /> | ||
| </head> | ||
|
|
||
| [Velero](https://velero.io/) is an open source tool to safely back up, recover, and migrate Kubernetes clusters and persistent volumes. | ||
| It works both on premises and in a public cloud. Velero consists of a server process running as a deployment in your | ||
| Kubernetes cluster and a command-line interface (CLI) with which DevOps teams and platform operators configure scheduled | ||
| backups, trigger ad-hoc backups, perform restores, and more. | ||
|
|
||
| Configuring and installing Velero involves two key steps: | ||
|
|
||
| - **Setting up AWS resources** – configuring IAM roles and policies. | ||
| - **Installing Velero** – deploying the Velero components into the Kubernetes cluster. | ||
|
|
||
| ## Configuring AWS IAM Roles and Policies | ||
|
|
||
| Velero requires specific IAM permissions to interact with AWS resources. These permissions allow Velero to create and manage EBS snapshots and volumes, as well as read and write backup data to the designated S3 bucket. This policy ensures Velero can perform backup and restore operations within your AWS account. | ||
|
|
||
| To simplify the setup, we recommend using the [terraform-module/velero/kubernetes](https://registry.terraform.io/modules/terraform-module/velero/kubernetes/latest) module. This module automates the creation of the necessary IAM roles and policies for Velero. You can find Velero configuration parameters in the [terraform-aws-platform](https://github.com/KubeRocketCI/terraform-aws-platform/blob/master/eks/irsa.tf#L367) repository. | ||
|
|
||
| With this configuration, the following IAM role will be created: | ||
|
|
||
| - **AWSIRSA_\<ClusterName\>_Velero**: This role will be used by Velero to perform backup and restore operations by managing EBS snapshots and accessing the S3 backup bucket. The attached policy grants Velero the required permissions to perform backup and restore operations in AWS. It includes the following capabilities: | ||
|
|
||
| - **EC2 permissions** — allow Velero to create, describe, tag, and delete EBS snapshots and volumes used during backup and restore processes. | ||
| - **S3 bucket access** — allows listing the backup bucket and performing read/write operations on objects, including uploading backup data, retrieving it during restores, and deleting or tagging objects as needed. | ||
|
|
||
| ## Install Velero | ||
|
|
||
| To deploy Velero in your Kubernetes cluster, we recommend using the [add-ons approach](https://github.com/epam/edp-cluster-add-ons/tree/main/clusters/core/addons/velero). Here's an example of how to configure values.yaml before installation: | ||
|
|
||
| ```yaml title="values.yaml" | ||
| velero: | ||
| # -- Velero service account settings for AWS access via IRSA. Replace the role ARN with your own IAM role. | ||
| serviceAccount: | ||
| server: | ||
| create: true | ||
| name: velero-server | ||
| annotations: | ||
| eks.amazonaws.com/role-arn: "arn:aws:iam::01234567890:role/AWSIRSA_Core_Velero" | ||
|
|
||
| # -- Use Kubernetes secrets for AWS credentials (false = use IRSA) | ||
| credentials: | ||
| useSecret: false | ||
|
|
||
| configuration: | ||
| # -- Backup storage settings for Velero | ||
| backupStorageLocation: | ||
| - name: default | ||
| provider: aws | ||
| bucket: velero-core | ||
| prefix: velero | ||
| config: | ||
| region: eu-central-1 | ||
| # -- Settings for volume snapshots | ||
| volumeSnapshotLocation: | ||
| - name: default | ||
| provider: aws | ||
| config: | ||
| region: eu-central-1 | ||
|
|
||
| # -- Init container to load AWS plugin for Velero | ||
| initContainers: | ||
| - name: velero-plugin-for-aws | ||
| image: velero/velero-plugin-for-aws:v1.13.1 | ||
| volumeMounts: | ||
| - mountPath: /target | ||
| name: plugins | ||
|
|
||
| # -------------------------------------------- | ||
| # Velero Schedule: krci | ||
| # -------------------------------------------- | ||
| # Description: | ||
| # Creates daily backups of the "krci" namespace | ||
| # on weekdays (Monday–Friday) at 13:00 UTC. | ||
| # Excludes PersistentVolumes and PVCs, | ||
| # does not snapshot volumes, | ||
| # stores backups in the "default" location, | ||
| # and retains them for 72 hours. | ||
| # -------------------------------------------- | ||
| schedules: | ||
MykolaMarusenko marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| krci: | ||
| disabled: true | ||
| paused: false | ||
| labels: | ||
| cluster: core | ||
| region: eu-central-1 | ||
| schedule: "0 13 * * 1-5" | ||
| useOwnerReferencesInBackup: false | ||
| template: | ||
| excludedClusterScopedResources: | ||
| - persistentvolumes | ||
| excludedNamespaceScopedResources: | ||
| - persistentvolumeclaims | ||
| includedNamespaces: | ||
| - krci | ||
| snapshotVolumes: false | ||
| storageLocation: default | ||
| ttl: 72h0m0s | ||
| ``` | ||
| At the end of the file, you will find backup schedule settings that you can use as a template for creating your own schedules. | ||
|
|
||
| ## Related Articles | ||
|
|
||
| * [Associate IAM Roles With Service Accounts](../infrastructure-providers/aws/enable-irsa.md) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.