Kosmos
Flexible and scalable Kubernetes multi-cluster management solution. The limitless expansion of Kubernetes. Make Kubernetes without boundaries
If you like Kosmos, give it a star on GitHub!
Kosmos v0.5.0 is now available.
What is Kosmos?
Kosmos is an open-source, integrated distributed cloud-native solution. The name "kosmos" is formed by combining the "k" representing Kubernetes with "cosmos" from Greek, symbolizing the infinite scalability of Kubernetes.
Kosmos mainly consists of three major modules: ClusterLink, ClusterTree, and Scheduler. In addition, Kosmos is also equipped with a tool named kosmosctl, which can quickly deploy Kosmos components, add clusters, and test network connection.
Core Features
Orchestration(ClusterTree)
The Kosmos ClusterTree module extends Kubernetes clusters in a tree-like manner, achieving cross-cluster orchestration of applications.
- Fully compatible with k8s API: Users can interact with the kube-apiserver of the host cluster as usual using tools like kubectl, client-go, etc. However, Pods are actually distributed across the entire multi-cloud, multi-cluster environment.
- Automated resource discovery: Kosmos supports the orchestration of all Kubernetes native applications. For stateful applications, Kosmos will automatically detect storage and permission resources that Pods depend on, such as pv/pvc, sa, etc., and perform automated bi-directional synchronization.
- Diverse Pod topology constraints: Users can easily control the distribution of Pods within the global cluster, for example, by region, availability zone, cluster, or node. This helps achieve high availability of applications and improve cluster resource utilization.
Scheduler
The Kosmos scheduler module is developed as an extension of the Kubernetes scheduling framework and serves as a reliable solution for managing containerized applications more efficiently and flexibly in hybrid, multi-cloud, and multi-cluster environments.
- Flexible scheduling of nodes and clusters: The Kosmos scheduler module allows users to intelligently schedule workloads between physical nodes and sub-clusters based on custom configurations. This enables users to fully utilize the resources of different nodes to ensure the best performance and availability of workloads. With this functionality, Kosmos enables flexible cross-cloud and cross-cluster deployment of workloads.
- Refined container distribution strategy: By introducing Custom Resource Definitions (CRD), users can precisely control the topology distribution of workloads. The configuration of CRDs allows users to specify the number of pods of workloads in different clusters and adjust the distribution ratio according to needs.
- Granular fragment resource consolidation: The Kosmos scheduler module can intelligently sense fragmentary resources in sub-clusters, effectively preventing situations where sub-cluster resources are insufficient after pods have been scheduled for deployment. This helps to ensure a more even distribution of workload resources across different nodes, improving the system's stability and performance.
Multi-Cluster Network(ClusterLink)
The goal of ClusterLink is to establish connections between multiple Kubernetes clusters. This module can be deployed and used independently. It supports cross-cluster PodIP and ServiceIP communication, multi-mode support (P2P or Gateway), global IP allocation, and dual-stack IPv6/IPv4, among other features.
- Cross-cluster PodIP and ServiceIP communication: Based on Linux vxlan tunnel technology, it makes L3 network connections across multiple Kubernetes clusters possible. This allows users to conduct Pod-to-Pod and Pod-to-Service communication within a global cluster scope.
- Multi-mode support:When joining clusters, you can choose between P2P or Gateway mode. Choosing P2P mode is suitable for underlying network interconnection, offering shorter network paths and superior performance. When selecting Gateway mode, it provides excellent compatibility, making it very suitable for hybrid multi-cloud scenarios.
- Support for global IP allocation:The Kosmos network allows two or more clusters within a global cluster to use the same Pod/Service subnet, facilitating subnet management for users. It supports configuring the mapping relationship between PodCIDR/ServiceCIDR and GlobalCIDR. GlobalIP is globally unique, and through GlobalIP, cross-cluster communication between services with conflicting network segments can be achieved.