liqo

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: Apache-2.0

README

Integration Pipeline Status

Liqo Logo

Enable dynamic and seamless Kubernetes multi-cluster topologies



Explore the docs »

View Demo · Report Bug · Request Feature

About the project

Liqo is a platform to enable dynamic and decentralized resource sharing across Kubernetes clusters, either on-prem or managed. Liqo allows to run pods on a remote cluster seamlessly and without any modification of Kubernetes and the applications. With Liqo it is possible to extend the control plane of a Kubernetes cluster across the cluster's boundaries, making multi-cluster native and transparent: collapse an entire remote cluster to a virtual local node, by allowing workloads offloading and resource management compliant with the standard Kubernetes approach.



Table of Contents
  1. Main Features
  2. Quickstart
  3. Installation
  4. Roadmap
  5. Contributing
  6. Community
  7. License

Main features

  • Decentralized governance: peer-to-peer paradigm, without any centralized management entity.
  • Clusters discovery: leverage on three different ways to discover (and peer to) other clusters:
    • Manual configuration: through a custom API representing other clusters
    • DNS: automatic discovery through DNS records
    • LAN: automatic discovery of neighboring clusters available in the same LAN.
  • Transparent offloading: pods scheduled on the virtual node are offloaded to the remote cluster; they can be controlled by merely accessing the pod objects in the local one; the resources needed by the pods (services, endpoints, configmaps, etc.) are translated and replicated remotely. It allows inter-cluster pod-to-pod and pod-to-service communication.
  • Pod resilience: the offloaded pods' lifecycle is controlled by a remote replicaset.
  • Inter-cluster networking: the clusters inter-connection is implemented by a Wireguard tunnel, which ensure encryption and reliability.
  • CNI independence: compliance with many CNIs (Calico, Cilium, Flannel, etc.) even in heterogeneous scenarios (the two clusters can have different CNIs).

Quickstart

This quickstart lets you try Liqo in a playground environment built by two clusters in KinD.

Provision two KinD clusters.

source <(curl -L https://get.liqo.io/clusters.sh)
Install Liqo on both clusters:
export KUBECONFIG=$KUBECONFIG_1
curl -L https://get.liqo.io | bash -s
export KUBECONFIG=$KUBECONFIG_2
curl -L https://get.liqo.io | bash -s

Wait that all containers are up and running. When a new virtual-kubelet pops out, a new node modeling the remote cluster is present and ready to receive pods. Check it out with:

kubectl get nodes
Use the resources

Create a new namespace and label it to tell Liqo that the pods created in that namespace are suitable for offloading in the remote cluster.

kubectl create namespace liqo-demo
kubectl label namespace liqo-demo liqo.io/enabled=true

Deploy the Google microservice Shop application.

kubectl apply -f https://get.liqo.io/app.yaml -n liqo-demo

You can observe that:

  • Your application is correctly working by exposing the application frontend port and later connecting with a browser to localhost:8000. To expose the pod port:
  kubectl port-forward -n liqo-demo service/frontend 8080:80
  • Your application is transparently deployed across two different clusters:
  kubectl get pods -n liqo-demo -o wide  

Going Further

If you want to explore the Liqo internals, including how to inspect and interact with a service deployed with Liqo, you can explore the documentation website:

Installation

Liqo can be installed by using Helm. The configuration depends on the cluster type (K8s, K3s, managed) and the provider. Possible scenarios can be found here.

Once you identified your scenario, follow the instructions for the proper installation environment.

Roadmap

Planned features for the next release (v0.3, expected early-September, 2021) are the following:

  • Support for deployments spanning across more than two clusters.
  • Support for a more balanced scheduling mechanism to distribute jobs across clusters.
  • Support for Amazon Elastic Kubernetes Service.
  • Support for more granular permission control over remote cluster resources.

Contributing

All contributors are warmly welcome. If you want to become a new contributor, we are so happy!. Just, before doing it, read the repo's guidelines presented on our documentation website.

Community

To get involved with the Liqo community, join the slack channel.

notification Community Meeting
Liqo holds weekly community meeting on Monday, 5.30pm UTC (6.30 CET, 9.30am PST). To join the community meeting, follow this link. Convert to your timezone here.

License

This project includes code from the Virtual Kubelet project https://github.com/virtual-kubelet/virtual-kubelet, licensed under the Apache 2.0 license.

Liqo is distributed under the Apache-2.0 License. See License for more information.

FOSSA Status

Liqo is a project kicked off at Polytechnic of Turin (Italy) and actively maintained with :heart: by all the Liqoers.

Directories

Path Synopsis
apis
discovery/v1alpha1
Package v1alpha1 contains API Schema definitions for the discovery v1alpha1 API group +kubebuilder:object:generate=true +groupName=discovery.liqo.io
Package v1alpha1 contains API Schema definitions for the discovery v1alpha1 API group +kubebuilder:object:generate=true +groupName=discovery.liqo.io
net/v1alpha1
Package v1alpha1 contains API Schema definitions for the liqonetliqoio v1alpha1 API group +kubebuilder:object:generate=true +groupName=net.liqo.io
Package v1alpha1 contains API Schema definitions for the liqonetliqoio v1alpha1 API group +kubebuilder:object:generate=true +groupName=net.liqo.io
offloading/v1alpha1
Package v1alpha1 contains API Schema definitions for the offloading v1alpha1 API group +kubebuilder:object:generate=true +groupName=offloading.liqo.io
Package v1alpha1 contains API Schema definitions for the offloading v1alpha1 API group +kubebuilder:object:generate=true +groupName=offloading.liqo.io
sharing/v1alpha1
Package v1alpha1 contains API Schema definitions for the sharing v1alpha1 API group +kubebuilder:object:generate=true +groupName=sharing.liqo.io
Package v1alpha1 contains API Schema definitions for the sharing v1alpha1 API group +kubebuilder:object:generate=true +groupName=sharing.liqo.io
virtualKubelet/v1alpha1
Package v1alpha1 contains API Schema definitions for the virtualkubelet v1alpha1 API group +kubebuilder:object:generate=true +groupName=virtualkubelet.liqo.io
Package v1alpha1 contains API Schema definitions for the virtualkubelet v1alpha1 API group +kubebuilder:object:generate=true +groupName=virtualkubelet.liqo.io
cmd
liqoctl/cmd
Package cmd defines the structure of commands available in liqoctl
Package cmd defines the structure of commands available in liqoctl
virtual-kubelet/root
Package root provides methods to build and start the virtual-kubelet.
Package root provides methods to build and start the virtual-kubelet.
internal
auth-service
Package authservice implements the logic of the Authentication Service
Package authservice implements the logic of the Authentication Service
crdReplicator
Package crdreplicator implements the logic for the replication of CustomResourceDefinitions between the peered clusters.
Package crdreplicator implements the logic for the replication of CustomResourceDefinitions between the peered clusters.
discovery
Package discovery implements the logic of the discovery of other clusters, both on local networks and in wide area networks
Package discovery implements the logic of the discovery of other clusters, both on local networks and in wide area networks
discovery/foreign-cluster-operator
Package foreignclusteroperator implements the logic of the ForeignCluster Operator
Package foreignclusteroperator implements the logic of the ForeignCluster Operator
discovery/search-domain-operator
Package searchdomainoperator implements the logic of the SearchDomain Operator
Package searchdomainoperator implements the logic of the SearchDomain Operator
discovery/utils
Package utils contains functions useful for the discovery component, in particular during the communications with a remote cluster.
Package utils contains functions useful for the discovery component, in particular during the communications with a remote cluster.
kubernetes
Package kubernetes wraps a set of packages copied verbatim (possibly removing unused functions) from upstream kubernetes, so that we do not have to import from k8s.io/kubernetes, which is currently problematic.
Package kubernetes wraps a set of packages copied verbatim (possibly removing unused functions) from upstream kubernetes, so that we do not have to import from k8s.io/kubernetes, which is currently problematic.
kubernetes/envvars
Package envvars is the package that builds the environment variables that kubernetes provides to the containers run by it.
Package envvars is the package that builds the environment variables that kubernetes provides to the containers run by it.
liqonet/route-operator
Package routeoperator contains the needed k8s operators in order to configure each k8s node to send traffic to the gateway pod when destined to a remote cluster.
Package routeoperator contains the needed k8s operators in order to configure each k8s node to send traffic to the gateway pod when destined to a remote cluster.
liqonet/tunnel-operator
Package tunneloperator contains the tunnel controller which configures the vpn tunnels, natting rules and routes in order to comunicate with the remote peering clusters and also the natmapping controller that configures nat rules for ExternalCIDR.
Package tunneloperator contains the tunnel controller which configures the vpn tunnels, natting rules and routes in order to comunicate with the remote peering clusters and also the natmapping controller that configures nat rules for ExternalCIDR.
utils/errdefs
Package errdefs defines the error types that are understood by other packages in this project.
Package errdefs defines the error types that are understood by other packages in this project.
pkg
auth
Package auth contains structures, interfaces and utility functions useful for both server and client authentication agents.
Package auth contains structures, interfaces and utility functions useful for both server and client authentication agents.
auth/errors
Package errors contains error types definition and related functions used by the Liqo Auth package.
Package errors contains error types definition and related functions used by the Liqo Auth package.
clusterid
Package clusterid contains definition and methods to manipulate the Liqo ClusterID
Package clusterid contains definition and methods to manipulate the Liqo ClusterID
consts
Package consts provides most useful constant for Liqo Controllers
Package consts provides most useful constant for Liqo Controllers
discovery
Package discovery contains structures, interfaces and utility functions useful for the discovery component.
Package discovery contains structures, interfaces and utility functions useful for the discovery component.
identityManager
Package identitymanager provides an interface, and its implementation, to handle the creation and the issue process of an identity for a remote cluster.
Package identitymanager provides an interface, and its implementation, to handle the creation and the issue process of an identity for a remote cluster.
identityManager/responseTypes
Package responsetypes contains utils for methods responses.
Package responsetypes contains utils for methods responses.
identityManager/testUtils
Package identitymanagertestutils provides utility funcition for identity manager testing.
Package identitymanagertestutils provides utility funcition for identity manager testing.
liqo-controller-manager/namespace-controller
Package namespacectrl contains Namespace Controller logic, and some tests for it
Package namespacectrl contains Namespace Controller logic, and some tests for it
liqo-controller-manager/namespaceMap-controller
Package namespacemapctrl contains NamespaceMap Controller logic and some functions for managing remote Namespaces.
Package namespacemapctrl contains NamespaceMap Controller logic and some functions for managing remote Namespaces.
liqo-controller-manager/namespaceMap-controller/testUtils
Package namespacemapctrltestutils provides utility function for namespaceMap controller testing.
Package namespacemapctrltestutils provides utility function for namespaceMap controller testing.
liqo-controller-manager/namespaceOffloading-controller
Package namespaceoffloadingctrl contains NamespaceOffloading Controller logic and some functions for adding DesiredMappings to NamespaceMaps Spec
Package namespaceoffloadingctrl contains NamespaceOffloading Controller logic and some functions for adding DesiredMappings to NamespaceMaps Spec
liqo-controller-manager/offloadingStatus-controller
Package offloadingstatuscontroller contains OffloadingStatus Controller logic.
Package offloadingstatuscontroller contains OffloadingStatus Controller logic.
liqo-controller-manager/resource-request-controller
Package resourcerequestoperator contains the ResourceRequest controller which reconciles the resource and creates new ResourceOffer and related tests.
Package resourcerequestoperator contains the ResourceRequest controller which reconciles the resource and creates new ResourceOffer and related tests.
liqo-controller-manager/resource-request-controller/interfaces
Package interfaces contains all the ResourceRequestOperator interfaces representing some of its components.
Package interfaces contains all the ResourceRequestOperator interfaces representing some of its components.
liqo-controller-manager/resource-request-controller/testutils
Package testutils contains utility functions used by the unit tests of the resource-request-controller
Package testutils contains utility functions used by the unit tests of the resource-request-controller
liqo-controller-manager/resourceoffer-controller
Package resourceoffercontroller implements the logic of the ResourceOffer Operator
Package resourceoffercontroller implements the logic of the ResourceOffer Operator
liqo-controller-manager/virtualNode-controller
Package virtualnodectrl contains VirtualNode Controller logic and some functions for managing NamespaceMap lifecycle.
Package virtualnodectrl contains VirtualNode Controller logic and some functions for managing NamespaceMap lifecycle.
liqoctl/add
Package add contains the logic to initiate an outgoing peering to a remote cluster
Package add contains the logic to initiate an outgoing peering to a remote cluster
liqoctl/common
Package common contains common definition and utils used across liqoctl
Package common contains common definition and utils used across liqoctl
liqoctl/docs
Package docs contains the logic that handle the docs command in liqoctl
Package docs contains the logic that handle the docs command in liqoctl
liqoctl/generate
Package generate contains the logic that handle the generate-add-command command in liqoctl
Package generate contains the logic that handle the generate-add-command command in liqoctl
liqoctl/install
Package install implements the install command in liqoctl.
Package install implements the install command in liqoctl.
liqoctl/install/aks
Package aks implements the logic to install Liqo on a AKS-based cluster
Package aks implements the logic to install Liqo on a AKS-based cluster
liqoctl/install/eks
Package eks implements the logic to install Liqo on a EKS-based cluster
Package eks implements the logic to install Liqo on a EKS-based cluster
liqoctl/install/gke
Package gke implements the logic to install Liqo on a GKE-based cluster
Package gke implements the logic to install Liqo on a GKE-based cluster
liqoctl/install/k3s
Package k3s implements the logic to install Liqo on a K3S-based cluster
Package k3s implements the logic to install Liqo on a K3S-based cluster
liqoctl/install/kind
Package kind implements the logic to install Liqo on a kind-based cluster
Package kind implements the logic to install Liqo on a kind-based cluster
liqoctl/install/kubeadm
Package kubeadm implements the logic to install Liqo on a kubeadm-based cluster
Package kubeadm implements the logic to install Liqo on a kubeadm-based cluster
liqoctl/install/provider
Package provider contains the interface required to support the Liqo install for a given provider.
Package provider contains the interface required to support the Liqo install for a given provider.
liqoctl/install/utils
Package installutils implements some utility functions for the liqo install providers
Package installutils implements some utility functions for the liqo install providers
liqoctl/remove
Package remove contains the logic to terminate an outgoing peering to a remote cluster
Package remove contains the logic to terminate an outgoing peering to a remote cluster
liqoctl/version
Package version contains the logic that handle the version command in liqoctl
Package version contains the logic that handle the version command in liqoctl
liqonet/errors
Package errors contains error types definition and related functions used by the Liqonet package.
Package errors contains error types definition and related functions used by the Liqonet package.
liqonet/ipam
Package ipam contains the IPAM module.
Package ipam contains the IPAM module.
liqonet/iptables
Package iptables contains the necessary data structures and functions to interact with iptables and therefore insert/delete filter and NAT rules.
Package iptables contains the necessary data structures and functions to interact with iptables and therefore insert/delete filter and NAT rules.
liqonet/natmappinginflater
Package natmappinginflater contains the NatMappingInflater, an object in charge of notify the Gateway component that a NAT mapping has to be carried out.
Package natmappinginflater contains the NatMappingInflater, an object in charge of notify the Gateway component that a NAT mapping has to be carried out.
liqonet/netns
Package netns defines and implements basic functions used to create and configure new network namespaces.
Package netns defines and implements basic functions used to create and configure new network namespaces.
liqonet/overlay
Package overlay contains the overlays implementations supported in liqo.
Package overlay contains the overlays implementations supported in liqo.
liqonet/routing
Package routing defines a common interface used to configure the routing tables and policy routing rules in order to reach the remote networks of the peering clusters.
Package routing defines a common interface used to configure the routing tables and policy routing rules in order to reach the remote networks of the peering clusters.
liqonet/test
Package test provides a mock type for IPAM module
Package test provides a mock type for IPAM module
liqonet/tunnel
Package tunnel specifies the interface that has to be implemented by the different vpn technologies.
Package tunnel specifies the interface that has to be implemented by the different vpn technologies.
liqonet/tunnel/wireguard
Package wireguard implements the Wireguard tunnels to be used as vpn technology to interconnect clusters.
Package wireguard implements the Wireguard tunnels to be used as vpn technology to interconnect clusters.
liqonet/utils
Package utils contain utility functions for the Liqonet package.
Package utils contain utility functions for the Liqonet package.
mutate
Package mutate defines the logic of Liqo Mutating Webhook.
Package mutate defines the logic of Liqo Mutating Webhook.
mutate/testUtils
Package mutatetestutils provides utility funcition for webhook testing.
Package mutatetestutils provides utility funcition for webhook testing.
peering-roles
Package peeringroles implements some utility functions to retrieve the ClusterRoles to bind in the different peering phases
Package peeringroles implements some utility functions to retrieve the ClusterRoles to bind in the different peering phases
peering-roles/basic
Package basic defines the permission to be enabled with the creation of the Tenant Namespace, this ClusterRole has the basic permissions to give to a remote cluster
Package basic defines the permission to be enabled with the creation of the Tenant Namespace, this ClusterRole has the basic permissions to give to a remote cluster
peering-roles/incoming
Package incoming defines the permission to be enabled when a ResourceRequest has been accepted, this ClusterRole has the permissions required to a remote cluster to manage an outgoing peering (incoming for the local cluster), when the Pods will be offloaded to the local cluster
Package incoming defines the permission to be enabled when a ResourceRequest has been accepted, this ClusterRole has the permissions required to a remote cluster to manage an outgoing peering (incoming for the local cluster), when the Pods will be offloaded to the local cluster
peering-roles/outgoing
Package outgoing defines the permission to be enabled when we send a ResourceRequest, this ClusterRole has the permissions required to a remote cluster to manage an incoming peering (outgoing for the local cluster), when the Pods will be offloaded from the local cluster
Package outgoing defines the permission to be enabled when we send a ResourceRequest, this ClusterRole has the permissions required to a remote cluster to manage an incoming peering (outgoing for the local cluster), when the Pods will be offloaded from the local cluster
tenantNamespace
Package tenantnamespace provides an interface, and its implementation, to handle the creation and the management of tenant namespaces
Package tenantnamespace provides an interface, and its implementation, to handle the creation and the management of tenant namespaces
uninstaller
Package uninstaller contains the Liqo uninstaller logic for a clean uninstall.
Package uninstaller contains the Liqo uninstaller logic for a clean uninstall.
utils
Package utils contains shared utility methods for the Liqonet package.
Package utils contains shared utility methods for the Liqonet package.
utils/apiserver
Package apiserver contains utility functions to configure the connection parameters to the Kubernetes API server to advertise to peering clusters.
Package apiserver contains utility functions to configure the connection parameters to the Kubernetes API server to advertise to peering clusters.
utils/args
Package args contains shared utility methods for argument parsing and validation.
Package args contains shared utility methods for argument parsing and validation.
utils/authenticationtoken
Package authenticationtoken contains shared utility methods for the management of the authentication token.
Package authenticationtoken contains shared utility methods for the management of the authentication token.
utils/cachedClient
Package cachedclient contains utility methods to create a new controller runtime client with cache.
Package cachedclient contains utility methods to create a new controller runtime client with cache.
utils/errorsManagement
Package errorsmanagement contains all utility function to use in case of errors.
Package errorsmanagement contains all utility function to use in case of errors.
utils/foreignCluster
Package foreigncluster contains shared utility methods to handle the ForeignCluster resources.
Package foreigncluster contains shared utility methods to handle the ForeignCluster resources.
utils/logs
Package logs contains shared utility methods for logging.
Package logs contains shared utility methods for logging.
utils/peeringConditions
Package peeringconditionsutils contains shared utility methods to handle the PeeringCondition resource.
Package peeringconditionsutils contains shared utility methods to handle the PeeringCondition resource.
utils/pod
Package pod contains utilities to deal with Pod objects.
Package pod contains utilities to deal with Pod objects.
utils/restcfg
Package restcfg contains utility functions to deal with rest configs.
Package restcfg contains utility functions to deal with rest configs.
utils/slice
Package slice contains utility functions to manage slices.
Package slice contains utility functions to manage slices.
utils/testutil
Package testutil contains some methods useful to mock components while testing
Package testutil contains some methods useful to mock components while testing
utils/trace
Package trace contains utility functions to deal with traces.
Package trace contains utility functions to deal with traces.
virtualKubelet/apiReflection/reflectors/incoming
Package incoming contains the logic to configure the reflection of target objects from a foreign cluster to the home cluster
Package incoming contains the logic to configure the reflection of target objects from a foreign cluster to the home cluster
virtualKubelet/apiReflection/reflectors/outgoing
Package outgoing contains the logic to configure the reflection of target objects from the home cluster to a foreign cluster
Package outgoing contains the logic to configure the reflection of target objects from the home cluster to a foreign cluster
virtualKubelet/liqoNodeProvider
Package liqonodeprovider implements the VirtualKubelet NodeProvider interface, it manages the node status monitoring the status of the Liqo resources (i.e.
Package liqonodeprovider implements the VirtualKubelet NodeProvider interface, it manages the node status monitoring the status of the Liqo resources (i.e.
virtualKubelet/manager
Package manager provides access to kubernetes resources for providers.
Package manager provides access to kubernetes resources for providers.
virtualKubelet/namespacesmapping
Package namespacesmapping implements the virtual-kubelet namespace reflection and namespace translation
Package namespacesmapping implements the virtual-kubelet namespace reflection and namespace translation
virtualKubelet/namespacesmapping/test
Package test implements a mock namespace reflection and namespace translation mechanism
Package test implements a mock namespace reflection and namespace translation mechanism
virtualKubelet/provider
Package provider contains methods implementing virtual-kubelet provider
Package provider contains methods implementing virtual-kubelet provider
virtualKubelet/roles/local
Package local defines the ClusterRole containing the permissions required by the virtual kubelet in the local cluster.
Package local defines the ClusterRole containing the permissions required by the virtual kubelet in the local cluster.
virtualKubelet/roles/remote
Package remote defines the ClusterRole containing the permissions required by the virtual kubelet in the remote cluster.
Package remote defines the ClusterRole containing the permissions required by the virtual kubelet in the remote cluster.
vkMachinery
Package vkMachinery contains the logic required to forge a new virtualKubelet instance and all related objects
Package vkMachinery contains the logic required to forge a new virtualKubelet instance and all related objects
vkMachinery/csr
Package csr contains the logic required to generate, create and approve Certificate Signing Requests (CSR) for the Virtual Kubelet instances.
Package csr contains the logic required to generate, create and approve Certificate Signing Requests (CSR) for the Virtual Kubelet instances.
vkMachinery/forge
Package forge contains the logic required to generate the virtual kubelet resources.
Package forge contains the logic required to generate the virtual kubelet resources.
webhookConfiguration
Package webhookConfiguration contains the logic to forge certificates and register the Liqo AdmissionWebhook
Package webhookConfiguration contains the logic to forge certificates and register the Liqo AdmissionWebhook
test
e2e/testutils
Package testutils encapsulates all methods and constants to perform E2E tests
Package testutils encapsulates all methods and constants to perform E2E tests
e2e/testutils/microservices
Package microservices implements an E2E test based on the Google Online Boutique (https://github.com/GoogleCloudPlatform/microservices-demo) to assess the E2E functionality of Liqo
Package microservices implements an E2E test based on the Google Online Boutique (https://github.com/GoogleCloudPlatform/microservices-demo) to assess the E2E functionality of Liqo
e2e/testutils/net
Package net implements basic network connecitivity test on Liqo to assess E2E functionality of the network
Package net implements basic network connecitivity test on Liqo to assess E2E functionality of the network
e2e/testutils/tester
Package tester contains the logic to access the test context and the cluster included
Package tester contains the logic to access the test context and the cluster included
e2e/testutils/util
Package util contains all the utility methods to execute the test (APIServer interaction, wait for condition, etc.).
Package util contains all the utility methods to execute the test (APIServer interaction, wait for condition, etc.).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL