link icon replaced

This commit is contained in:
govardhan
2025-06-19 14:09:10 +05:30
parent 60adbde60c
commit 172f8e2b34
158 changed files with 996 additions and 996 deletions

View File

@ -1,7 +1,7 @@
Backup of Kubernetes Cluster using Velero[](#backup-of-kubernetes-cluster-using-velero "Permalink to this headline")
Backup of Kubernetes Cluster using Velero[🔗](#backup-of-kubernetes-cluster-using-velero "Permalink to this headline")
=====================================================================================================================
What is Velero[](#what-is-velero "Permalink to this headline")
What is Velero[🔗](#what-is-velero "Permalink to this headline")
---------------------------------------------------------------
[Velero](https://velero.io) is the official open source project from VMware. It can back up all Kubernetes API objects and persistent volumes from the cluster on which it is installed. Backed up objects can be restored on the same cluster, or on a new one. Using a package like Velero is essential for any serious development in the Kubernetes cluster.
@ -10,7 +10,7 @@ In essence, you create object store under OpenStack, either using Horizon or Swi
Velero has its own CLI command system so it is possible to automate creation of backups using cron jobs.
What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this headline")
What We Are Going To Cover[🔗](#what-we-are-going-to-cover "Permalink to this headline")
---------------------------------------------------------------------------------------
> * Getting EC2 Client Credentials
@ -21,7 +21,7 @@ What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this h
> * Example 1 Basics of Restoring an Application
> * Example 2 Snapshot of Restoring an Application
Prerequisites[](#prerequisites "Permalink to this headline")
Prerequisites[🔗](#prerequisites "Permalink to this headline")
-------------------------------------------------------------
No. 1 **Hosting**
@ -79,7 +79,7 @@ Either way, we shall assume that there is a container called “bucketnew”:
Supply your own unique name while working through this article.
Before Installing Velero[](#before-installing-velero "Permalink to this headline")
Before Installing Velero[🔗](#before-installing-velero "Permalink to this headline")
-----------------------------------------------------------------------------------
We shall install Velero on Ubuntu 22.04; using other Linux distributions would be similar.
@ -93,7 +93,7 @@ sudo apt update && sudo apt upgrade
It will be necessary to have access to a Kubernetes cluster, v1.16 or later, with DNS and container networking enabled. For more information on supported Kubernetes versions, see Velero [compatibility matrix](https://github.com/vmware-tanzu/velero#velero-compatabilty-matrix).
### Installation step 1 Getting EC2 client credentials[](#installation-step-1-getting-ec2-client-credentials "Permalink to this headline")
### Installation step 1 Getting EC2 client credentials[🔗](#installation-step-1-getting-ec2-client-credentials "Permalink to this headline")
First fetch EC2 credentials from OpenStack. They are necessary to access private bucket (container). Generate them on your own by executing the following commands:
@ -105,7 +105,7 @@ openstack ec2 credentials list
Save somewhere the *Access Key* and the *Secret Key*. They will be needed in the next step, in which you set up a Velero configuration file.
### Installation step 2 Adjust the configuration file - “values.yaml”[](#installation-step-2-adjust-the-configuration-file-values-yaml "Permalink to this headline")
### Installation step 2 Adjust the configuration file - “values.yaml”[🔗](#installation-step-2-adjust-the-configuration-file-values-yaml "Permalink to this headline")
Now create or adjust a configuration file for Velero. Use text editor of your choice to create that file. On MacOS or Linux, for example, you can use **nano**, like this:
@ -462,7 +462,7 @@ schedules:
```
### Installation step 3 Creating namespace[](#installation-step-3-creating-namespace "Permalink to this headline")
### Installation step 3 Creating namespace[🔗](#installation-step-3-creating-namespace "Permalink to this headline")
Velero must be installed in an eponymous namespace, *velero*. This is the command to create it:
@ -472,7 +472,7 @@ namespace/velero created
```
### Installation step 4 Installing Velero with a Helm chart[](#installation-step-4-installing-velero-with-a-helm-chart "Permalink to this headline")
### Installation step 4 Installing Velero with a Helm chart[🔗](#installation-step-4-installing-velero-with-a-helm-chart "Permalink to this headline")
Here are the commands to install Velero by means of a Helm chart:
@ -538,7 +538,7 @@ velero-1721031498 Opaque 1 3d1h
```
### Installation step 5 Installing Velero CLI[](#installation-step-5-installing-velero-cli "Permalink to this headline")
### Installation step 5 Installing Velero CLI[🔗](#installation-step-5-installing-velero-cli "Permalink to this headline")
The final step is to install Velero CLI Command Line Interface suitable for working from the terminal window on your operating system.
@ -595,7 +595,7 @@ velero help
```
Working with Velero[](#working-with-velero "Permalink to this headline")
Working with Velero[🔗](#working-with-velero "Permalink to this headline")
-------------------------------------------------------------------------
So far, we have
@ -645,7 +645,7 @@ This is the result in terminal window:
![three_backups_mybackup.png](../_images/three_backups_mybackup.png)
Example 1 Basics of Restoring an Application[](#example-1-basics-of-restoring-an-application "Permalink to this headline")
Example 1 Basics of Restoring an Application[🔗](#example-1-basics-of-restoring-an-application "Permalink to this headline")
---------------------------------------------------------------------------------------------------------------------------
Let us now demonstrate how to restore a Kubernetes application. Let us first clone one example app from GitHub. Execute this:
@ -704,7 +704,7 @@ nginx-backup New 0 0 <nil> n/a <none>
```
Example 2 Snapshot of restoring an application[](#example-2-snapshot-of-restoring-an-application "Permalink to this headline")
Example 2 Snapshot of restoring an application[🔗](#example-2-snapshot-of-restoring-an-application "Permalink to this headline")
-------------------------------------------------------------------------------------------------------------------------------
Start the sample nginx app:
@ -748,7 +748,7 @@ Run `velero restore describe nginx-backup-20220728015234` or `velero restore log
```
Delete a Velero backup[](#delete-a-velero-backup "Permalink to this headline")
Delete a Velero backup[🔗](#delete-a-velero-backup "Permalink to this headline")
-------------------------------------------------------------------------------
There are two ways to delete a backup made by Velero.
@ -769,10 +769,10 @@ Delete all data in object/block storage
will delete the backup resource including all data in object/block storage
Removing Velero from the cluster[](#removing-velero-from-the-cluster "Permalink to this headline")
Removing Velero from the cluster[🔗](#removing-velero-from-the-cluster "Permalink to this headline")
---------------------------------------------------------------------------------------------------
### Uninstall Velero[](#uninstall-velero "Permalink to this headline")
### Uninstall Velero[🔗](#uninstall-velero "Permalink to this headline")
To uninstall Velero release:
@ -781,14 +781,14 @@ helm uninstall velero-1721031498 --namespace velero
```
### To delete Velero namespace[](#to-delete-velero-namespace "Permalink to this headline")
### To delete Velero namespace[🔗](#to-delete-velero-namespace "Permalink to this headline")
```
kubectl delete namespace velero
```
What To Do Next[](#what-to-do-next "Permalink to this headline")
What To Do Next[🔗](#what-to-do-next "Permalink to this headline")
-----------------------------------------------------------------
Now that Velero is up and running, you can integrate it into your routine. It will be useful in all classical backups scenarios for disaster recovery, cluster and namespace migration, testing and development, application rollbacks, compliance and auditing and so on. Apart from these broad use cases, Velero will help with specific Kubernetes cluster tasks for backing up, such as: