You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
```
5
10
6
11
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.
8
14
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.
10
17
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:
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`.
24
32
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*.
Copy file name to clipboardExpand all lines: docs/advanced/peering/inter-cluster-authentication.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,15 @@ cl01 16m Active
69
69
70
70
Check the [offloading guide](/advanced/peering/offloading-in-depth) to understand how to start the pod offloading and the reflection of the resources.
71
71
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
+
72
81
### Undo the authentication
73
82
74
83
`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:
122
131
```
123
132
124
133
```{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.
126
135
```
127
136
128
137
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:
199
208
NAME TYPE DATA AGE
200
209
liqo-signed-nonce Opaque 2 78s
201
210
```
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
+
```
202
216
203
217
### Creation of the Identity resource (cluster provider)
The standard *liqoctl* peer command requires the machine running it to have simultaneous access to both cluster API servers, through their *kubeconfigs*.
41
41
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.
42
42
```
43
43
44
-
```{warning}
44
+
```{admonition} Note
45
45
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.
Copy file name to clipboardExpand all lines: docs/usage/peer.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,17 @@ You should see the following output:
111
111
INFO (local) ResourceSlice resources: Accepted
112
112
```
113
113
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
+
114
125
## Results
115
126
116
127
The command configures the above-described modules.
0 commit comments