-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathbackup-and-restore-work.html.md.erb
109 lines (71 loc) · 5.26 KB
/
backup-and-restore-work.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
title: Backing Up and Restoring Tanzu Kubernetes Workloads Using Velero
owner: TKGI
---
This topic describes the Velero back up and restore process for Kubernetes workloads deployed to VMware Tanzu Kubernetes Grid Integrated Edition (TKGI) clusters.
## <a id="velero-about"></a>About Tanzu Kubernetes Workload Back Up and Restore
Tanzu Kubernetes workload back up and restore is done using [Velero](https://velero.io/) software.
Velero is an open-source product that provides full back up and recovery of Kubernetes workloads.
Velero supports back up and recovery for all types of Kubernetes workloads deployed to Tanzu clusters.
###<a id="app-types"></a> Application Types
An application deployed to Kubernetes can be stateless or stateful.
Velero can back up and restore both types, but the procedure might differ slightly.
The examples in [Scenarios for Backing Up and Restoring TKGI Workloads](./velero-scenarios.html)
demonstrate the differences and process for each type.
In addition, an application might have a service attached or ingress enabled.
See [Services and Ingress](./backup-and-restore-work.html#services-ingress)
for a summary of the available techniques for ensuring full restoration of functionality.
###<a id="services-ingress"></a> Services and Ingress
If a service is attached, the IP address might need to be static for back up and restore to work as expected.
Velero back up and restore is agnostic of NSX objects. To restore applications with same IP address, there are two mechanism available with TKGI:
* Create a Kubernetes load balancer service with a [static IP address](./velero-stateful-lb.html) by specifying the `loadBalancerIP` in the YAML file.
* Deploy a Kubernetes cluster with a static IP address for pod ingress by defining [network profile](./velero-stateful-ingress.html).
###<a id="persistence-prov"></a> Storage Types
Tanzu Kubernetes clusters support two persistence providers: VMware Cloud Provider (vCP) and the Container Storage Interface (CSI).
vCP is VMware's Kubernetes storage plugin that allows cluster nodes on vSphere to interact with vCenter to support Kubernetes Persistent Volume objects. CSI is open-source software that enables Kubernetes implementations to provide a standard interface for storage systems, without having to create drivers for each system.
The provider is defined in the storage class. Velero back up and restore is slightly different depending on the type of persistence provider.
The VMware Cloud Provider (vCP) StorageClass provisioner only works with TKGI:
```
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: demo-sts-sc
provisioner: kubernetes.io/vsphere-volume
parameters:
diskformat: thin
```
The Container Storage Interface (CSI) StorageClass provisioner works with TKGI, TKGM, and TKGS.
```
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: guestbook-sc-csi
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: csi.vsphere.vmware.com
parameters:
datastoreurl: "ds:///vmfs/volumes/vsan:52d8eb4842dbf493-41523be9cd4ff7b7/"
```
##<a id="requirements"></a> Tanzu Kubernetes Workload Back Up and Restore Requirements
This section lists the requirements for using Velero for Kubernetes workload back up and recovery.
###<a id="velero-cluster-req"></a> Cluster Configuration
To back up and recover TKGI Kubernetes workloads using Velero,
TKGI installs a Velero and a node-agent Pod on each target Kubernetes cluster.
To configure your target clusters for Velero back up and recovery,
complete the steps in [Modify the Host Path](velero-install.html#velero-privileged)
in _Installing Velero with File System Backup_.
###<a id="velero-objstore-req"></a> Object Store
You need to provide an object store for Velero backups. Velero supports a number of object store providers.
For more information, see [Providers](https://velero.io/docs/v1.6/supported-providers/) in the Velero documentation.
MinIO is an S3-compatible object store that is easy to install and use.
This documentation uses the MinIO server installed on a Linux VM as the backup destination for the example scenarios.
###<a id="velero-client-req"></a> Velero CLI
To perform Velero back up and recovery, you install the Velero CLI on a client VM. This can be the TKGI client VM or an administrator laptop.
###<a id="velero-version-req"></a> Velero Version
Refer to the [Release Notes](./release-notes.html) for the supported Velero version.
###<a id="velero-airgap-req"></a>Air-Gapped Environment
When you run the Velero CLI to install Velero on the Kubernetes cluster, Velero pods are deployed to the cluster. To install the prods, the instructions assume that the cluster environment has internet access, including the client where the Velero CLI is installed as well as the Kubernetes cluster. In case the environment has no internet access, you use can use a private container registry to install Velero pods onto the target cluster. See [Air-gapped deployments](./velero-install.html#velero-cluster-install-airgapped).
##<a id="get-started"></a>Get Started Using Velero
To get started with Velero:
* Review the scenarios in [Scenarios for Backing Up and Restoring TKGI Workloads](./velero-scenarios.html).
* Complete the steps in [Installing Velero with File System Backup](./velero-install.html).