Skip to content

Commit

Permalink
Added info about using merged-kubeconfig for joining the cluster.
Browse files Browse the repository at this point in the history
Signed-off-by: Aswin Surayanarayanan <[email protected]>
  • Loading branch information
aswinsuryan committed Mar 3, 2020
1 parent 0ed5332 commit 2bea6e4
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ If `~/.local/bin` is on your PATH, you will then be able to run subctl.

To deploy submariner in a two Kubernetes cluster setup follow the below steps

* Deploy Broker with Dataplane - To deploy the Submariner broker along with the data cluster run
* Deploy Broker with Dataplane - To deploy the Submariner broker along with the dataplane on the same cluster run:
```
subctl deploy-broker --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --clusterid <CLUSTER-ID-FOR-TUNNELS>
```

Note, if --dataplane (enabled by default) was set, it is not required to join this cluster, as it was already joined. It is only required to join the other clusters.

* Join Clusters with Broker - To join all the other clusters with the broker cluster, run using the broker-info.subm generated in the folder from which the previous step was run.

Expand All @@ -66,17 +66,32 @@ The [Lighthouse](https://github.com/submariner-io/lighthouse) project helps in c

To deploy Submariner with Lighthouse follow the below steps.

* Deploy Broker with Dataplane - To deploy the Submariner broker along with the data cluster, run using the broker-info.subm generated in the folder from which the previous step was run.
* Create a kubeconfig file which has the context of all the clusters. If KUBECONFIG environment variable set with the path to all clusters (like KUBECONFIG=/home/user/.config/east/auth/kubeconfig-dev:/home/user/.config/west/auth/kubeconfig-dev), you could use the below command.

This comment has been minimized.

Copy link
@manosnoam

manosnoam Mar 3, 2020

all the clusters (including the Broker cluster)

```
subctl deploy-broker --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
kubectl config view --flatten > merged_kubeconfig
```

* Join Clusters with Broker - To join all the other clusters with the broker cluster run using the broker-info.subm generated in the folder from which the previous step was run.
* Deploy Broker with Dataplane - To deploy the Submariner broker along with the dataplane on the same cluster run:
```
subctl deploy-broker --kubecontext <BROKER-CONTEXT-NAME> --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
```
Note, if --dataplane (enabled by default) was set, it is not required to join this cluster, as it was already joined. It is only required to join the other clusters.

For example
```
subctl join --kubeconfig <PATH-TO-KUBECONFIG-DATA-CLUSTER> broker-info.subm --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
subctl deploy-broker --kubecontext west --kubeconfig $WEST --dataplane --service-discovery --broker-cluster-context west --clusterid west
```

* Join Clusters with Broker - To join all the other clusters with the broker cluster run using the broker-info.subm generated in the folder from which the previous step was run and use the merged kubeconfig created in the first step.

```
subctl join --kubecontext <DATA-CLUSTER-CONTEXT-NAME> --kubeconfig <MERGED-KUBECONFIG> broker-info.subm --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
```

For example
```
subctl join --kubecontext east --kubeconfig merged_kubeconfig broker-info.subm --broker-cluster-context west --clusterid east
```

# Development

Expand Down

0 comments on commit 2bea6e4

Please sign in to comment.