Skip to content

Commit

Permalink
Merge pull request #433 from deepakkinni/xport-5
Browse files Browse the repository at this point in the history
[Crossport]velero vSphere plugin docs for v1.3.0 (#420)
  • Loading branch information
Deepak Kinni authored Dec 17, 2021
2 parents 990e7c2 + a74cfc2 commit 75ae83b
Show file tree
Hide file tree
Showing 2 changed files with 194 additions and 12 deletions.
79 changes: 75 additions & 4 deletions docs/guest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This document discusses the velero vSphere plugin installation process in a **Tanzu Kubernetes Grid Service** environment aka TKG Guest Clusters. For more information on the Tanzu Kubernetes Grid Service refer to the following [documentation](https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/index.html).

## Table of Contents

1. [Compatibility](#compatibility)
2. [Prerequisites](#prerequisites)
3. [Installation Steps](#installation-steps)
4. [Upgrade](#upgrade)
5. [Uninstall](#uninstall)
6. [Backup](#backup)
7. [Restore](#restore)

## Compatibility

| vSphere/ESXi Version | vSphere CSI Version | Kubernetes Version | Velero Version | Velero Plugin for vSphere Version |
Expand All @@ -22,24 +32,40 @@ The Data Manager Virtual Machine also needs to be installed to enable TKGS backu

1. [Install Velero](https://velero.io/docs/v1.5/basic-install/)
2. [Install Object Storage Plugin](#install-object-storage-plugin)
3. [Install Velero Plugin for vSphere](#install-velero-plugin-for-vsphere)
3. [Create Velero vSphere Plugin Config](#create-velero-vsphere-plugin-config)
4. [Install Velero vSphere Plugin](#install-velero-vsphere-plugin)

### Install Object Storage Plugin

Volume backups are stored in an object store bucket. They are stored in the same bucket configured for the object storage plugin of Velero. Before installing the vSphere plugin, a Velero object storage plugin is required.

Currently, only AWS plugin is supported and compatible with vSphere plugin. Please refer to [velero-plugin-for-aws](https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/master/README.md) for more details about using **AWS S3** as the object store for backups. S3-compatible object stores, e.g, **MinIO**, are also supported via AWS plugin. Please refer to [install with MinIO](https://velero.io/docs/v1.5/contributions/minio/).

### Install Velero Plugin for vSphere
### Create Velero vSphere Plugin Config

The config map is used to specify that the plugin is being installed on `GUEST` cluster.

```bash
% cat <<EOF | kubectl -n <velero-namespace> apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: velero-vsphere-plugin-config
data:
cluster_flavor: GUEST
EOF
```

### Install Velero vSphere Plugin

```bash
velero plugin add <plugin-image>
```

For Version 1.1.1 the command is
For Version 1.3.0 the command is

```bash
velero plugin add vsphereveleroplugin/velero-plugin-for-vsphere:v1.1.1
velero plugin add vsphereveleroplugin/velero-plugin-for-vsphere:v1.3.0
```
Please refer to [velero-plugin-for-vsphere tags](https://github.com/vmware-tanzu/velero-plugin-for-vsphere/tags) for correct tags for versions 1.1.1 and higher.

Expand All @@ -54,6 +80,51 @@ If it is an air-gapped environment, please refer to [Install Notes with Customiz

To use velero-plugin-for-vsphere with a storage provider secured by a self-signed certificate, please refer to [velero-plugin-for-vsphere with a storage provider secured by a self-signed certificate](self-signed-certificate.md).

## Upgrade

1. [Scale down Velero and plugin components](#scale-down-velero-and-plugin-components)
2. [Create Velero vSphere Plugin Configuration](#create-velero-vsphere-plugin-configmap)
3. [Update the plugin image](#update-the-plugin-image)
4. [Scale up velero deployment](#scale-up-velero-deployment)

#### Scale down Velero and plugin components

The following command scales down the `velero` deployment and deletes `backup-driver`.

```bash
kubectl -n <velero-namespace> delete deploy/backup-driver
kubectl -n <velero-namespace> scale deploy/velero --replicas=0
```

### Create Velero vSphere Plugin ConfigMap

The config map is used to specify that the plugin is being installed on `GUEST` cluster.

```bash
% cat <<EOF | kubectl -n <velero-namespace> apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: velero-vsphere-plugin-config
data:
cluster_flavor: GUEST
EOF
```

### Update the plugin image

```bash
kubectl -n <velero-namespace> set image deployment/velero velero-plugin-for-vsphere=vsphereveleroplugin/velero-plugin-for-vsphere:v1.3.0
```

Please refer to [velero-plugin-for-vsphere tags](https://github.com/vmware-tanzu/velero-plugin-for-vsphere/tags) for correct tags for versions 1.3.0 and higher.

### Scale up Velero deployment

```bash
kubectl -n <velero-namespace> scale deploy/velero --replicas=1
```

## Uninstall

To uninstall the plugin, run the following command to remove the **InitContainer** of velero-plugin-for-vsphere from the Velero deployment first.
Expand Down
127 changes: 119 additions & 8 deletions docs/vanilla.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
1. [Compatibility](#compatibility)
2. [Prerequisites](#prerequisites)
3. [Install](#install)
4. [Uninstall](#uninstall)
5. [Backup](#backup)
6. [Restore](#restore)
4. [Upgrade](#upgrade)
5. [Uninstall](#uninstall)
6. [Backup](#backup)
7. [Restore](#restore)

## Compatibility

Expand Down Expand Up @@ -35,27 +36,68 @@ of VDDK Programming Guide. **Note: please apply privileges at the vCenter Server

1. [Install Velero](https://velero.io/docs/v1.5/basic-install/)
2. [Install Object Storage Plugin](#install-object-storage-plugin)
3. [Install Velero Plugin for vSphere](#install-velero-plugin-for-vsphere)
3. [Create VC Credential Secret](#create-vc-credential-secret)
4. [Create Velero vSphere Plugin Config](#create-velero-vsphere-plugin-config)
5. [Install Velero vSphere Plugin](#install-velero-vsphere-plugin)

### Install Object Storage Plugin

Volume backups are stored in an object store bucket. They are stored in the same bucket configured for the object storage plugin of Velero. Before installing the vSphere plugin, a Velero object storage plugin is required.

Currently, only AWS plugin is supported and compatible with vSphere plugin. Please refer to [velero-plugin-for-aws](https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/master/README.md) for more details about using **AWS S3** as the object store for backups. S3-compatible object stores, e.g, **MinIO**, are also supported via AWS plugin. Please refer to [install with MinIO](https://velero.io/docs/v1.5/contributions/minio/).

### Install Velero Plugin for vSphere
### Create VC Credential Secret

You can retrieve these values from Secret `vsphere-config-secret` in `vmware-system-csi` namespace for
2.3 and later vSphere CSI driver OR Secret `vsphere-config-secret` in `kube-system` namespace for 2.2 or earlier vSphere
CSI driver. In other cases these values can be obtained from vSphere Admin.



```bash
% cat csi-vsphere.conf
[Global]
cluster-id = "cluster1"

[VirtualCenter "10.182.1.133"]
user = "[email protected]"
password = "password"
port = "443"

% kubectl -n <velero-namespace> create secret generic velero-vsphere-config-secret --from-file=csi-vsphere.conf
```

### Create Velero vSphere Plugin Config

The config map provides information about the cluster flavor and VC Credential Secret created in the previous step during
install.

```bash
% cat <<EOF | kubectl -n <velero-namespace> apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: velero-vsphere-plugin-config
data:
cluster_flavor: VANILLA
vsphere_secret_name: velero-vsphere-config-secret
vsphere_secret_namespace: velero
EOF
```

### Install Velero vSphere Plugin

```bash
velero plugin add <plugin-image>
```

For Version 1.1.1 the command is
For Version 1.3.0 the command is

```bash
velero plugin add vsphereveleroplugin/velero-plugin-for-vsphere:v1.1.1
velero plugin add vsphereveleroplugin/velero-plugin-for-vsphere:v1.3.0
```

Please refer to [velero-plugin-for-vsphere tags](https://github.com/vmware-tanzu/velero-plugin-for-vsphere/tags) for correct tags for versions 1.1.1 and higher.
Please refer to [velero-plugin-for-vsphere tags](https://github.com/vmware-tanzu/velero-plugin-for-vsphere/tags) for correct tags for versions 1.3.0 and higher.

#### Install in Air-gapped environment

Expand All @@ -65,6 +107,75 @@ If it is an air-gapped environment, please refer to [Install Notes with Customiz

To use velero-plugin-for-vsphere with a storage provider secured by a self-signed certificate, please refer to [velero-plugin-for-vsphere with a storage provider secured by a self-signed certificate](self-signed-certificate.md).

## Upgrade

An alternate to upgrading would be to [Uninstall](#uninstall) and do a fresh [Install](#install)

1. [Scale down Velero and plugin components](#scale-down-velero-and-plugin-components)
2. [Create vSphere Credentials Secret](#create-vsphere-credentials-secret)
3. [Create Velero vSphere Plugin Configuration](#create-velero-vsphere-plugin-configuration)
4. [Update the plugin image](#update-the-plugin-image)
5. [Scale up velero deployment](#scale-up-velero-deployment)

#### Scale down Velero and plugin components

The following command scales down the `velero` deployment and deletes `backup-driver` and `datamgr-for-vsphere-plugin`

```bash
kubectl -n <velero-namespace> delete deploy/backup-driver
kubectl -n <velero-namespace> delete daemonset datamgr-for-vsphere-plugin
kubectl -n <velero-namespace> scale deploy/velero --replicas=0
```

### Create vSphere Credentials Secret

You can retrieve these values from Secret `vsphere-config-secret` in `vmware-system-csi` namespace for
2.3 and later vSphere CSI driver OR Secret `vsphere-config-secret` in `kube-system` namespace for 2.2 or earlier vSphere
CSI driver

```bash
% cat csi-vsphere.conf
[Global]
cluster-id = "cluster1"

[VirtualCenter "10.182.1.133"]
user = "[email protected]"
password = "password"
port = "443"

% kubectl -n <velero-namespace> create secret generic velero-vsphere-config-secret --from-file=csi-vsphere.conf
```

### Create Velero vSphere Plugin Configuration

The config map provides information about the cluster flavor and VC Credential Secret created in the previous step during
install.

```bash
% cat <<EOF | kubectl -n <velero-namespace> apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: velero-vsphere-plugin-config
data:
cluster_flavor: VANILLA
vsphere_secret_name: velero-vsphere-config-secret
vsphere_secret_namespace: <velero-namespace>
EOF
```

### Update the plugin image

```bash
kubectl -n velero set image deployment/velero velero-plugin-for-vsphere=vsphereveleroplugin/velero-plugin-for-vsphere:v1.3.0
```

### Scale up Velero deployment

```bash
kubectl -n <velero-namespace> scale deploy/velero --replicas=1
```

## Uninstall

To uninstall the plugin, run the following command to remove the InitContainer of velero-plugin-for-vsphere from the Velero deployment first.
Expand Down

0 comments on commit 75ae83b

Please sign in to comment.