Skip to content

Commit

Permalink
docs(liqoctl): peer command added description of server service posit…
Browse files Browse the repository at this point in the history
…ion flag
  • Loading branch information
fra98 committed Jan 31, 2025
1 parent 730d807 commit cb2934c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/advanced/manual-peering.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
In the [peer two clusters](../usage/peer.md) section of this documentation, we used the `liqoctl peer`, which automatically configure each single module of Liqo to create a peering between two clusters. However, in some cases where:

- you want to configure Liqo peerings via a [declarative approach](./peering/peering-via-cr.md) via CRs.
- it is required to configure the WireGuard gateway server on the cluster consumer (e.g. the nodes of the cluster provider are [behind a NAT or a physical load balancer](./nat.md))
- The consumer needs to create multiple requests for resources (ResourceSlice) or you want to customize the way resources are distributed on virtual nodes

you might need to configure each single module separatly, or to interact with a specific module to obtain the desired result.
Expand Down
7 changes: 5 additions & 2 deletions docs/advanced/nat.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ This page describes how to configure Liqo in the above scenarios.

![The provider is behind a NAT](../_static/images/advanced/nat/provider-nat.svg)

The `liqoctl peer` command configures the gateway server on the provider cluster.
The `liqoctl peer` command by default configures the gateway server on the provider cluster.
However, there may be cases where the provider cluster's nodes are not directly reachable, such as when they are behind a NAT, while the consumer cluster is directly accessible.
For instance, in the image above, cluster 2 is behind a NAT and is therefore not directly reachable.

This problem can be solved by swapping the roles of the gateways, hence configuring the client on the cluster provider and the server on the consumer.
To do so, you need to use [manual peering](./manual-peering.md), setting the inter-cluster network up separately.
To do so, you have two options:

- run the `liqoctl peer` command with the `--server-service-position=Consumer` flag
- perform a [manual peering](./manual-peering.md), setting the inter-cluster network up separately

![The gateway server has been on the consumer side](../_static/images/advanced/nat/consumer-nat.svg)

Expand Down
3 changes: 2 additions & 1 deletion docs/usage/peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ To perform a peering without having access to both clusters, you need to manuall
The peering command enables all 3 liqo modules and performs the following steps:

1. **enables networking**.
Exchanges network configurations and creates the two **gateways** (server in the provider, client in the consumer) to let the two clusters communicate over a secure tunnel.
Exchanges network configurations and creates the two **gateways** (one server in a cluster and one client in the other) to let the two clusters communicate over a secure tunnel.
By default the gateway server in placed in the provider, while the gateway client in the consumer, but you can configure it with the `--server-service-position` flag.
2. **enables authentication**.
Authenticates the consumer with the provider.
In this step, the consumer obtains an `Identity` (*kubeconfig*) to replicate resources to the provider cluster.
Expand Down

0 comments on commit cb2934c

Please sign in to comment.