Skip to content

Commit

Permalink
doc:update bakcup insatll plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Xieql <xieqianglong@huawei.com>
  • Loading branch information
Xieql committed Oct 12, 2023
1 parent 092b133 commit 76184cb
Show file tree
Hide file tree
Showing 6 changed files with 2,560 additions and 2,571 deletions.
67 changes: 52 additions & 15 deletions docs/content/en/docs/fleet-manager/backup-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Kurator Fleet Backup Plugin Configuration Guide"
linkTitle: "Kurator Fleet Backup Plugin Configuration Guide"
weight: 40
description: >
The easiest way to manage multi cluster backup plugin with fleet.
The easiest way to manage multi cluster backup plugin with fleet.
---

To support Kurator's unified backup, restore, and migration features, it's imperative to first configure the backup plugin for [Fleet](https://kurator.dev/docs/references/fleet-api/#fleet). This guide will walk you through configuring the [Velero](https://velero.io/)-based backup plugin for Fleet, laying the groundwork for Kurator's unified backup, restore, and migration capabilities.
Expand All @@ -13,7 +13,7 @@ To support Kurator's unified backup, restore, and migration features, it's imper
Before diving into the specifics, let's take a moment to understand the overall architecture and how various components interact with each other. Below is the architecture diagram of the Kurator Fleet Backup Plugin.

{{< image width="100%"
link="./image/fleet-backup-plugin.png"
link="./image/backup-arch.svg"
>}}

The diagram illustrates:
Expand Down Expand Up @@ -58,34 +58,68 @@ For more configuration options, please refer to the [Fleet API](https://kurator.
```console
kubectl create secret generic kurator-member1 --from-file=kurator-member1.config=/root/.kube/kurator-member1.config
kubectl create secret generic kurator-member2 --from-file=kurator-member2.config=/root/.kube/kurator-member2.config
kubectl apply -f kurator/examples/backup/common/attachedcluster.yaml
kubectl apply -f - <<EOF
apiVersion: cluster.kurator.dev/v1alpha1
kind: AttachedCluster
metadata:
name: kurator-member1
namespace: default
spec:
kubeconfig:
name: kurator-member1
key: kurator-member1.config
---
apiVersion: cluster.kurator.dev/v1alpha1
kind: AttachedCluster
metadata:
name: kurator-member2
namespace: default
spec:
kubeconfig:
name: kurator-member2
key: kurator-member2.config
EOF
```

## Create a Fleet with the Backup Plugin Enabled

### Use Minio

If you opt to use Minio, apply the following configuration example:
If you opt to use Minio, apply the following configuration:

```console
kubectl apply -f examples/backup/fleet-minio.yaml
kubectl apply -f - <<EOF
apiVersion: fleet.kurator.dev/v1alpha1
kind: Fleet
metadata:
name: quickstart
namespace: default
spec:
clusters:
- name: kurator-member1
kind: AttachedCluster
- name: kurator-member2
kind: AttachedCluster
plugin:
backup:
storage:
location:
bucket: velero
provider: aws
endpoint: http://172.18.255.200:9000
region: minio
secretName: minio-credentials
EOF
```

> **Note**: The `endpoint`(http://172.18.255.200:9000) in `fleet-minio.yaml` is depends on your minio service ip, check your minio service ip in [Minio installation guide](/docs/setup/install-minio).
### Use OBS

If you choose to use OBS, apply the following configuration example:
If you choose to use OBS, apply the following configuration:

```console
kubectl apply -f examples/backup/fleet-obs.yaml
```

### Fleet Backup Plugin Configuration Explained

Here's the details of `fleet-obs.yaml`:

```yaml
kubectl apply -f - <<EOF
apiVersion: fleet.kurator.dev/v1alpha1
kind: Fleet
metadata:
Expand All @@ -106,13 +140,16 @@ spec:
endpoint: http://obs.cn-south-1.myhuaweicloud.com
region: cn-south-1
secretName: obs-credentials
EOF
```

### Fleet Backup Plugin Configuration Explained

Let's delve into the `spec` section of the above Fleet:

- `clusters`: Contains the two `AttachedCluster` objects created earlier, indicating that the backup plugin will be installed on these two clusters.

- `plugin`: The `backup` indicates the description of a backup plugin. Currently, it only contains configurations related to storage. For more configuration options, please refer to the [Fleet API](https://kurator.dev/docs/references/fleet-api/).
- `plugin`: The `backup` indicates the description of a backup plugin. Currently, it only contains storage related configurations. For more configuration options, please refer to the [Fleet API](https://kurator.dev/docs/references/fleet-api/).

Within this storage configuration, users should ensure that the details in the location field are accurate. This information primarily differentiates the configurations in fleet-obs.yaml from fleet-minio.yaml. Additionally, the secretName refers to the name of the secret that was established earlier within the same namespace.

Expand Down
2,508 changes: 2,508 additions & 0 deletions docs/content/en/docs/fleet-manager/image/backup-arch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,497 changes: 0 additions & 2,497 deletions docs/content/en/docs/fleet-manager/image/fleet-backup-plugin.svg

This file was deleted.

19 changes: 0 additions & 19 deletions examples/backup/common/attachedcluster.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions examples/backup/fleet-minio.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions examples/backup/fleet-obs.yaml

This file was deleted.

0 comments on commit 76184cb

Please sign in to comment.