Kuscia (Kubernetes-based Secure Collaborative InfrA) is a lightweight privacy computing task orchestration framework based on K3s. It abstracts heterogeneous infrastructure and protocols to provide a unified foundation for resource management, application scheduling, container loading, service discovery, and data security.
Core Architecture
The cluster consists of two main parts:
- Control Plane (Master): Responsible for scheduling and resource management.
- Nodes: Responsible for computation.
Key Components
Control Plane Components
- K3s: A lightweight Kubernetes distribution for managing built-in resources.
- Kuscia Controllers: A set of custom controllers:
Job Controller: Parses Job DAGs, orchestrates multi-task scheduling, and collects task status.Task Controller: Parses task descriptions and implements multi-party Co-Scheduling (corresponds to vertices in a Job DAG).Kuscia Scheduler: Handles Co-Scheduling of multi-party Pods with an 'All-or-Nothing' effect.Domain Controller: Manages node resources and assigns Namespaces.DomainRoute Controller: Manages routing rules, identity authentication, and authorization policies between nodes and the Master.InterConn Controllers: Enables connectivity between different control planes for multi-party task scheduling.Data Controller (Not Open Source): Manages data authorization.Serving Controller (Not Open Source): Orchestrates and schedules resident task flows.
- Kuscia Storage (Not Open Source): Supplements K3s storage for large-value resources like job configurations.
- Envoy: Acts as a traffic proxy between nodes and the Master, or between Masters. It receives routing and security policies from the
DomainRoute Controller.
Node Components
Nodes are privacy computing nodes composed of working machines (VMs or physical) hosting privacy computing application Pods. They are categorized by networking mode:
- Lite Nodes: Used in centralized networks; they do not contain a control plane.
- Autonomy Nodes: Used in P2P networks; each contains its own independent control plane.
Lite Node Sub-components:
- Agent: Handles node registration and container management (lifecycle of Pods and node instances).
- NetworkMesh: Provides networking infrastructure, including
CoreDNS (service discovery), DomainRoute (routing/auth), Envoy (traffic proxy), and Transport (message queue communication). - DataMesh (Incomplete): Manages data source/dataset registration. Warning: Do not use in production as it lacks permission control.