forked from kurator-dev/kurator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doc: Add Fleet submariner plugin doc (kurator-dev#668)
* add plugin doc Signed-off-by: Tom <[email protected]> * add subctl check Signed-off-by: Tom <[email protected]> * update submariner doc Signed-off-by: Tom <[email protected]> --------- Signed-off-by: Tom <[email protected]>
- Loading branch information
1 parent
1b90819
commit 99ef3db
Showing
1 changed file
with
100 additions
and
0 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
docs/content/en/docs/fleet-manager/submariner-plugin.md
This file contains 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,100 @@ | ||
--- | ||
title: "Enable multi cluster networking with Submariner" | ||
linkTitle: "Enable multi cluster networking with Submariner" | ||
weight: 20 | ||
description: > | ||
The easiest way to manage multi cluster submariner plugin with fleet. | ||
--- | ||
|
||
In this tutorial we’ll cover the basics of how to use [Fleet](https://kurator.dev/docs/references/fleet-api/#fleet) to manage submariner plugin on a group of clusters. | ||
|
||
## Prerequisites | ||
|
||
1. Setup Fleet manager by following the instructions in the [installation guide](/docs/setup/install-fleet-manager/). | ||
|
||
2. Running the following command to create two secrets to access attached clusters. | ||
|
||
```bash | ||
# Create secrets for the attached clusters | ||
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 | ||
|
||
# Label a gateway node for each attached cluster | ||
kubectl label node kurator-member1-control-plane submariner.io/gateway=true --kubeconfig=/root/.kube/kurator-member1.config | ||
kubectl label node kurator-member2-control-plane submariner.io/gateway=true --kubeconfig=/root/.kube/kurator-member2.config | ||
``` | ||
|
||
### Create a fleet with metric plugin enabled | ||
|
||
`SUBMARINER_PSK` needs to be set as described in [here](https://submariner.io/operations/deployment/helm/). | ||
|
||
```bash | ||
export SUBMARINER_PSK=$(LC_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 64 | head -n 1) | ||
|
||
envsubst < examples/fleet/network/submariner-plugin.yaml | kubectl apply -f - | ||
``` | ||
|
||
After a while, we can see the fleet is `ready`: | ||
|
||
```bash | ||
kubectl wait fleet quickstart --for='jsonpath='{.status.phase}'=Ready' | ||
``` | ||
|
||
### Verify the Installation | ||
|
||
To ensure that the Submariner plugin is successfully installed and running. | ||
|
||
Run the following commands: | ||
|
||
```bash | ||
kubectl get pod -n submariner-operator --kubeconfig=/root/.kube/kurator-member1.config | ||
kubectl get pod -n submariner-operator --kubeconfig=/root/.kube/kurator-member2.config | ||
``` | ||
|
||
More detailed verification steps can be done as follows: | ||
|
||
> `subctl` needs to be installed to perform checks, please refer to the [Install subctl](https://submariner.io/operations/deployment/helm/#install-subctl). | ||
- Diagnostic checks: | ||
|
||
Perform `subctl diagnose` on each cluster: | ||
|
||
```bash | ||
subctl diagnose all --kubeconfig /root/.kube/kurator-member1.config | ||
``` | ||
|
||
- Verify the connectivity between the clusters: | ||
|
||
```bash | ||
export KUBECONFIG=/root/.kube/kurator-member1.config:/root/.kube/kurator-member2.config | ||
subctl verify --context kurator-member1 --tocontext kurator-member2 | ||
subctl verify --context kurator-member2 --tocontext kurator-member1 | ||
``` | ||
|
||
## Cleanup | ||
|
||
Guides for you to clean up the fleets and plugins. | ||
|
||
### 1. Cleanup the Submariner Plugin | ||
|
||
Tutorial for manual uninstallation can be found in Sumariner Documatation [here](https://submariner.io/operations/cleanup/#manual-uninstall). | ||
|
||
> Deleting the cluster to start from scratch is **recommended** because potential crd dependencies conflicts and some hard-to-find legacy resources or settings. | ||
### 2. Cleanup the Fleet | ||
|
||
When the fleet is deleted, all associated plugins will also be removed: | ||
|
||
```bash | ||
kubectl delete fleet quickstart | ||
``` | ||
|
||
### 3. Cleanup the Infrastructure | ||
|
||
Uninstall fleet manager: | ||
|
||
```bash | ||
helm uninstall kurator-fleet-manager -n kurator-system | ||
``` | ||
|
||
{{< boilerplate cleanup >}} |