Skip to content

Commit d57e88d

Browse files
committed
Docs: in-band docs refactored
1 parent 0c8c92d commit d57e88d

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# Kubernetes API Server Proxy
22

33
The Kubernetes API Server Proxy is a Liqo component that allows you to expose the Kubernetes API Server of a cluster to a remote cluster through the Liqo network fabric.
4-
This feature is useful when you want to establish a peering relationship between two clusters, but you cannot expose the Kubernetes API Server to the public.
4+
5+
This feature is **internally** used by the [in-band peering](UsagePeeringInBand) to establish a peering relationship between two clusters, which does not publicly expose the Kubernetes API Server.
6+
7+
```{warning}
8+
If you just need to peer two clusters without publicly exposing the Kubernetes API server, you can use the [in-band peering](UsagePeeringInBand).
9+
```
510

611
The Kubernetes API Server Proxy is an Envoy HTTP server that accepts [HTTP Connect](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT) requests and forwards them to the Kubernetes API Server of the local cluster.
7-
It has no permission on the local cluster, and the requesters must authenticate with the Kubernetes API Server to access the resources.
12+
It just proxy the requests to the API server and it has no permission on the local cluster.
13+
This means that, as usual, all the requesters must authenticate with the Kubernetes API Server to access the resources.
814

9-
The Kubernetes API Server Proxy is deployed as a Kubernetes deployment in the `liqo` namespace.
15+
By default the Kubernetes API Server Proxy is deployed as a Kubernetes deployment in the `liqo` namespace and it is exposed by a service, whose address is remapped by an `IP` CRD located in the `liqo` namespace.
16+
This allows another peer cluster to reach the Kubernetes API server of the peer even when this is not directly reachable, by passing through the **gateways tunnel** between the clusters, using the remapped IP.
1017

11-
By default, its service is remapped by an `IP` CRD in the `liqo` namespace.
12-
You can get its IP address by running the following command:
18+
You can get this IP address by running the following command:
1319

1420
```bash
1521
kubectl get ip -n liqo api-server-proxy -o wide
@@ -20,6 +26,9 @@ NAME LOCAL IP AGE REMAPPED IPS
2026
api-server-proxy 10.95.245.141 167m {"wild-frog":"10.70.0.2"}
2127
```
2228

23-
Note that in order to use it in a remote cluster, you may need to remap it to a different IP address according to the remote cluster network configuration as explained in the [external IP remapping](ExternalIPRemappingConnectToExternalHost) page.
29+
Note that **the IP retrieved with the command above might not be used as is in a remote cluster, you may need to remap it** to a different IP address according to the remote cluster network configuration, as explained in the [external IP remapping](ExternalIPRemappingConnectToExternalHost) page.
30+
31+
For example, let's suppose that a cluster `cl01` wants to reach the Kubernetes API Server Proxy of another cluster `cl02`.
2432

25-
For example, if the `REMAPPED_EXT_CIDR` is *10.81.0.0/16* and the `REMAPPED_IP` is *10.70.0.3* the final IP will be *10.81.0.3*.
33+
Looking at the `Configuration` resource, we might see that, for example, the `REMAPPED_EXT_CIDR` is *10.81.0.0/16*, which means that the requests directed to that network will be redirected to cluster `cl01` and remmapped to the `cl02` external CIDR.
34+
Therefore, if the `REMAPPED_IP` of the `api-server-proxy` in `cl02` is *10.70.0.3*, the final IP to be used in `cl01` to reach the Kubernetes API Server Proxy will be *10.81.0.3*.

docs/advanced/peering/inter-cluster-authentication.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ cl01 16m Active
6969

7070
Check the [offloading guide](/advanced/peering/offloading-in-depth) to understand how to start the pod offloading and the reflection of the resources.
7171

72+
### In-Band
73+
74+
If you can't make the Kubernetes API Server of the **Provider** cluster reachable from the **Consumer**, you can leverage on **in-band** peering.
75+
You can enable this by setting the `--in-band` flag in the `liqoctl authenticate` command, which automatically configure all the features needed for this mechanism to work (i.e., the API server proxy and the IP remapping).
76+
77+
```{admonition} Note
78+
For this feature to work, the Liqo **networking module** must be enabled.
79+
```
80+
7281
### Undo the authentication
7382

7483
`liqoctl unauthenticate` allows to undo the changes applied by the `authenticate` command. Even in this case, the user should be able to access both the involved clusters.
@@ -122,7 +131,7 @@ When successful the output of the command will be something like the following:
122131
```
123132

124133
```{admonition} Tip
125-
**Take note of the nonce as it can will be used in the following step**.
134+
Take note of the **nonce** as it can will be used in the following step.
126135
```
127136

128137
As a result of this command, you should be able to see:
@@ -199,6 +208,11 @@ As a result of the command, you should be able to see:
199208
NAME TYPE DATA AGE
200209
liqo-signed-nonce Opaque 2 78s
201210
```
211+
212+
```{admonition} Note
213+
If you want to use the [in-band](UsagePeeringInBand) approach, use the `spec.proxyURL` field inside the `Tenant` CRD.
214+
Check the [Kubernetes API Server Proxy](/advanced/k8s-api-server-proxy.md) page
215+
```
202216

203217
### Creation of the Identity resource (cluster provider)
204218

docs/features/peering.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,11 @@ The approach is schematized at a high level in the figure below.
3636

3737
![Peering architecture](/_static/images/features/peering/peering-arch.drawio.svg)
3838

39-
```{admonition} Note
39+
```{warning}
4040
The standard *liqoctl* peer command requires the machine running it to have simultaneous access to both cluster API servers, through their *kubeconfigs*.
4141
If this is not possible, refer to the advanced guide to learn how to perform the [peering manually](/advanced/manual-peering) without having contemporary access to both clusters.
4242
```
4343

44-
```{warning}
44+
```{admonition} Note
4545
The user can adopt different peering approaches depending if it has contemporary access to both clusters or not, as described in the [dedicated page](/advanced/peering-strategies.md).
46-
47-
If you cannot expose the Kubernetes API Server to the public, you can leverage the Liqo networking to connect to the remote Kubernetes API Server, and the related traffic will flow into the cross-cluster VPN tunnel by leveraging the [IP remapping](../advanced/external-ip-remapping.md) (of the `liqo-proxy` service) and the [Kubernetes API Server proxy](../advanced/k8s-api-server-proxy.md) features.
48-
You can achieve this by setting the `--in-band` flag in the `liqoctl peer` or `liqoctl authenticate` commands, which automatically configure all the features needed for this mechanism to work (i.e., the API server proxy and the IP remapping).
49-
Note that, for this feature to work, the Liqo networking module must be enabled.
5046
```

docs/usage/peer.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ You should see the following output:
111111
INFO (local) ResourceSlice resources: Accepted
112112
```
113113

114+
(UsagePeeringInBand)=
115+
116+
### In-Band
117+
118+
If you can't make the Kubernetes API Server of the **provider** cluster reachable from the **consumer**, you can leverage on **in-band** peering.
119+
You can enable this by setting the `--in-band` flag in the `liqoctl peer` command, which automatically configure all the features needed for this mechanism to work (i.e., the API server proxy and the IP remapping).
120+
121+
```{admonition} Note
122+
For this feature to work, the Liqo **networking module** must be enabled.
123+
```
124+
114125
## Results
115126

116127
The command configures the above-described modules.

0 commit comments

Comments
 (0)