Skip to content

Commit

Permalink
add doc and example
Browse files Browse the repository at this point in the history
Signed-off-by: Tom <[email protected]>
  • Loading branch information
Flying-Tom committed Aug 7, 2024
1 parent cb05c86 commit 3ae6ea6
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
59 changes: 59 additions & 0 deletions docs/content/en/docs/fleet-manager/submariner-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
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
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
```

### Create a fleet with metric plugin enabled

```bash
kubectl apply -f examples/fleet/network/submariner-plugin.yaml
```

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 --kubeconfig=/root/.kube/kurator-member1.config | grep submariner
kubectl get pod --kubeconfig=/root/.kube/kurator-member2.config | grep submariner
```

## Cleanup

Delete the fleet created

```bash
kubectl delete fleet quickstart
```

Uninstall fleet manager:

```bash
helm uninstall kurator-fleet-manager -n kurator-system
```

{{< boilerplate cleanup >}}
39 changes: 39 additions & 0 deletions examples/fleet/network/submariner-plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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
---
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:
submariner:
extraArgs:
operator:
image:
pullPolicy: "IfNotPresent"
submariner:
natEnabled: true

0 comments on commit 3ae6ea6

Please sign in to comment.