Skip to content

Commit

Permalink
docs: liqoctl generate/delete peering-user
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiolor committed Jan 30, 2025
1 parent 13bf3a1 commit 3ea3943
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions docs/usage/peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,49 @@ You can configure and fine-tune each module separately using the individual comm
For the majority and the cases the `liqoctl peer` is enough.
However, **to know the best strategy for each case and the requirements of each approach, check the [peering strategies guide](/advanced/peering-strategies.md)**.

### Peering establishment
### Getting the required permissions to establish a peering

To create a peering with a *provider* cluster, you will require a kubeconfig with a set of permissions to establish a connection with it.

The [liqoctl](../installation/liqoctl.md) CLI tool provides utility functions to manage the permissions of users able to create a peering connection with the current cluster.

**From the *provider* cluster**, you can run the following command to generate a *kubeconfig*:

```bash
liqoctl generate peering-user \
--kubeconfig $PROVIDER_KUBECONFIG_PATH \
--consumer-cluster-id $CONSUMER_CLUSTER_ID > $CONSUMER_KUBECONFIG_PATH
```

```{warning}
Once you generate the *kubeconfig*, take note of it as it will not be stored by Liqo.
If you lose it, you will need to delete and recreate it.
```

This command will store a *kubeconfig* with **the minimum permissions to create and destroy a peering with the current cluster** from a cluster with ID `$CONSUMER_CLUSTER_ID`.

You are allowed to have a single peering user for each consumer cluster, so you will not be able to create a new kubeconfig for the same consumer cluster until you delete the previous one.

````{admonition} Note
To delete a peering user for the consumer cluster with ID `$CONSUMER_CLUSTER_ID`, run:
```bash
liqoctl delete peering-user \
--consumer-cluster-id $CONSUMER_CLUSTER_ID
```
**Once you delete a peering user, its kubeconfig will not be valid anymore, even if a new peering user for the same cluster is created.**
````


### Establish a peering connection

To proceed, ensure that you are operating in the *consumer* cluster, and then issue the *liqoctl peer* command:

```bash
liqoctl --kubeconfig=$CONSUMER_KUBECONFIG_PATH peer --remote-kubeconfig $PROVIDER_KUBECONFIG_PATH
liqoctl peer \
--kubeconfig=$CONSUMER_KUBECONFIG_PATH \
--remote-kubeconfig $PROVIDER_KUBECONFIG_PATH
```

```{warning}
Expand Down

0 comments on commit 3ea3943

Please sign in to comment.