|
1 | 1 | --- |
2 | | -title: Offloading |
| 2 | +title: Resource Offloading |
3 | 3 | weight: 4 |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | ## Overview |
7 | 7 |
|
8 | 8 | The peering process terminates by creating a new virtual node in the home cluster. |
9 | | -According to the Liqo terminology, the new virtual node is called _big node_, as it represents (and aggregates) a subset |
10 | | -of the resources available in the foreign cluster. Conversely, the home cluster becomes what we call a _big cluster_, |
11 | | -as it represents a cluster whose resources span (transparently) across multiple physical clusters. |
| 9 | +According to the Liqo terminology, the new virtual node is called *big node*, as it represents (and aggregates) a subset of the resources available in the foreign cluster. |
| 10 | +Conversely, the home cluster becomes what we call a *big cluster*, as it represents a cluster whose resources span (transparently) across multiple physical clusters. |
12 | 11 |
|
13 | | -In Kubernetes, each physical node is managed by the |
14 | | -[Kubelet](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/), a process running in the hosting |
15 | | -machine that interfaces with the Kubernetes API server, and handles the lifecycle of the pods scheduled on it. |
| 12 | +In Kubernetes, each physical node is managed by the [kubelet](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/), a process running in the hosting machine that interfaces with the Kubernetes API server and handles the lifecycle of the pods scheduled on it. |
16 | 13 |
|
17 | | -Since the foreign cluster is represented by a local (virtual) node in the home cluster, offloading a pod on the remote |
18 | | -cluster correspond to scheduling it on a specific node. |
19 | | -When the virtual Kubelet creates a new pod in the foreign cluster, the foreign scheduler elects one _remote, physical_ |
20 | | -node as host for the received pod, while the _remote, physical_ kubelet managing that pod takes care of the containers' |
21 | | -execution. |
| 14 | +Since the foreign cluster is represented by a virtual node in the home cluster, offloading a pod on the remote cluster corresponds to scheduling it on a specific node. |
| 15 | +When the [virtual kubelet](#virtual-kubelet) creates a new pod in the foreign cluster, the foreign scheduler elects one *remote, physical* node as host for the received pod, while the *remote, physical* kubelet managing that pod takes care of the containers' execution. |
22 | 16 |
|
23 | | -According to this mechanism, the offloading of a pod to the foreign cluster is fully compliant with the Kubernetes |
24 | | -control plane: the home cluster can control all the remote jobs by interacting with the big node that models the remote |
25 | | -cluster. |
| 17 | +According to this mechanism, the offloading of a pod to the foreign cluster is fully compliant with the Kubernetes control plane: the home cluster can control all the remote jobs by interacting with the big node that represents the remote cluster. |
26 | 18 |
|
27 | 19 | ### Virtual Kubelet |
28 | 20 |
|
29 | | -The _big node_ is a virtual node, hence it cannot have a real `kubelet` process such as normal (physical) nodes. |
30 | | -Liqo leverages a custom version of the [Virtual kubelet](https://github.com/virtual-kubelet/virtual-kubelet) project for |
31 | | -the management of the virtual node, with the kubelet managing the virtual node that runs as a (containerized) pod as a |
32 | | -part of the Liqo control plane. |
33 | | -In a nutshell, a cluster that peers with `N` foreign clusters will have `N` big nodes, representing the `N` remote |
34 | | -clusters, and it will run `N` instances of the virtual kubelet, each one dedicated to the mapping between the (local) |
35 | | -big node and the corresponding (remote) foreign cluster. |
| 21 | +The *big node* is a virtual node, so it cannot have a real kubelet process such as normal physical nodes. |
| 22 | +Liqo leverages a custom version of the [virtual kubelet project](https://github.com/virtual-kubelet/virtual-kubelet) for the management of the virtual node. |
| 23 | +In a nutshell, a cluster that peers with `N` foreign clusters has `N` big nodes representing the clusters and runs `N` instances of the virtual kubelet process. |
36 | 24 |
|
37 | | -Generally speaking, a real Kubelet is in charge of accomplishing two tasks: |
38 | | -* handling the node resources and reconciling its status |
39 | | -* taking the received pods, starting the containers, and reconciling their status in the pod resource. |
| 25 | +Generally speaking, a standard kubelet is in charge of accomplishing two tasks: |
| 26 | + |
| 27 | +1. Handling the node resource and reconciling its status. |
| 28 | +2. Taking the received pods, starting the containers, and reconciling their status in the pod resource. |
40 | 29 |
|
41 | 30 | Similarly, the virtual kubelet is in charge of: |
42 | | -* creating the virtual node resource and reconciling its status, as described in the |
43 | | - [node-management](features/node-management) section; |
44 | | -* offloading the local pod scheduled on the virtual node to the remote cluster, as described in the |
45 | | -[computing](features/computing) section. |
46 | 31 |
|
47 | | -Also, our implementation provides a feature we called "reflection", described [here](features/api-reflection). |
| 32 | +1. Creating the virtual node resource and reconciling its status, as described in the [node-management](/concepts/offloading/node-management/#overview) section. |
| 33 | +2. Offloading the local pod scheduled on the virtual node to the remote cluster, as described in the [computing](/concepts/offloading/computing#overview) section. |
| 34 | + |
| 35 | +Also, our implementation provides a feature we called "reflection", described [here](/concepts/offloading/api-reflection/#overview). |
48 | 36 |
|
49 | 37 | ### Namespace mapping |
50 | 38 |
|
51 | | -To make the pods in a certain namespace suitable to be offloaded in the remote cluster, the virtual Kubelet has to face |
52 | | -with the problem of the offloading namespace, i.e., in which namespace of the remote cluster to create the pods. |
53 | | -Further details can be found in the dedicated [section](features/namespace-management). |
| 39 | +The virtual kubelet has to face the namespace replication problem to make the pods in a certain namespace suitable to be offloaded. |
| 40 | +Further details can be found in the dedicated [section](/concepts/offloading/namespace-replication/#the-liqo-namespace-model). |
54 | 41 |
|
55 | 42 | ### Scheduling behavior |
56 | 43 |
|
57 | | -The virtual node is created with a specific taint. To make a pod available to be scheduled on that node, that taint must |
58 | | -be tolerated. The toleration is added by a `MutatingWebhook` watching all the pods being created in all the namespaces |
59 | | -labeled with the label `liqo.io/enabled="true"`. |
60 | | - |
61 | | -By default, the Kubernetes scheduler selects the eligible node with the highest score (scores are computed on several |
62 | | -parameters, among which the available resources). |
| 44 | +The virtual node is created with a specific taint. To make a pod available to be scheduled on a virtual node that taint must be tolerated. |
| 45 | +The toleration is added by the Liqo MutatingWebhook watching the pods created in all the namespaces labeled with the label `liqo.io/enabled="true"`. |
| 46 | +By default, the Kubernetes scheduler selects the eligible node with the highest score (scores are computed on several parameters, among which the available resources). |
0 commit comments