back to home

rk8s-dev / rk8s

A lightweight Kubernetes-compatible container orchestration system written in Rust, implementing the Container Runtime Interface (CRI) with support for single containers, Kubernetes-style pods, and Docker Compose-style multi-container applications.

View on GitHub
387 stars
71 forks
22 issues
RustShellStarlark

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing rk8s-dev/rk8s in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/rk8s-dev/rk8s)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

rk8s - A Lite Version of Kubernetes in Rust rk8s is a lightweight, Kubernetes-compatible container orchestration system built on top of Youki, implementing the Container Runtime Interface (CRI) with support for three primary workload types: single containers, Kubernetes-style pods, and Docker Compose-style multi-container applications. The rk8s project is initiated by the Web3 Infrastructure Foundation and developed with support from Associate Professor Feng Yang’s lab at Nanjing University and the Institute of Software Chinese Academy of Sciences, through the R2CN. The project is currently in **WIP** stage and **should not be used in production environments**. Architecture Overview rk8s follows a distributed architecture with both standalone and cluster deployment modes: Core Components • **RKL (Container Runtime Interface)** - The primary runtime component supporting CLI operations and daemon mode • **RKS (Control Plane)** - Kubernetes-like control plane combining API server, scheduler, and controller functionality • **Xline** - etcd-compatible distributed storage for cluster state • **Redfannel** - Centralized Flannel Network Solution Implemented in Rust Supported Workload Types • Single Container Workloads Manage standalone containers with resource limits and port mappings: **Example single container specification:** • Kubernetes-Style Pods Group multiple containers sharing the same network namespace and lifecycle, implementing the Kubernetes pod model with pause containers for namespace sharing: **Pod Architecture:** • Pause container establishes shared namespaces (PID, Network, IPC, UTS) • Work containers join the pause container's namespaces • CRI-compliant pod sandbox management • Resource limits and port mappings per container **Example pod specification:** • Docker Compose-Style Applications The compose functionality represents rk8s's philosophy of providing familiar developer experiences while maintaining Kubernetes compatibility. This approach bridges the gap between local development workflows and production Kubernetes deployments. **Design Philosophy:** • **Developer Familiarity** - Use Docker Compose syntax that developers already know • **Kubernetes Compatibility** - Internally translate compose specifications to Kubernetes-compatible pod structures • **Unified Runtime** - Single runtime handles both Kubernetes pods and Compose applications • **Progressive Complexity** - Start with simple compose files, migrate to full Kubernetes specs as needed **Example compose specification:** Deployment Modes Local Mode (Standalone) Direct CLI interaction with local container runtime: • No central control plane required • Immediate container creation and management • Ideal for development and testing Cluster Mode (Distributed) Full Kubernetes-like cluster with distributed components: • RKS control plane for scheduling and state management • RKL daemons on worker nodes • Xline for distributed state storage • QUIC-based communication between components Project Structure Quick Start Prerequisites • Rust toolchain (1.70+) • Root privileges for container operations • Docker (for creating OCI bundles) Build and Setup • **Build the project:** • **Prepare network config:** • **Prepare container images:** Usage Examples **Single Container:** **Pod Management(Standalone):** **Pod Management(Cluster):** **Daemon Mode:** **RKS:** For detail about building a cluster with RKS and RKL, please refer to RKS–RKL usage. Key Features • **CRI Compliance** - Full Container Runtime Interface implementation • **Kubernetes Compatibility** - Pod specifications and resource management • **Docker Compose Support** - Familiar multi-container application definitions • **Namespace Sharing** - Proper pod networking with pause containers • **Resource Management** - CPU and memory limits with cgroups integration • **Redfannel** - Centralized Flannel Network Solution Implemented in Rust • **Daemon Mode** - Static pod reconciliation and monitoring • **Cluster Orchestration** - Distributed scheduling and state management License • MIT LICENSE ( LICENSE-MIT or https://opensource.org/licenses/MIT) • Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0) Contributing The rk8s project relies on community contributions and aims to simplify getting started. Pick an issue, make changes, and submit a pull request for community review. More information on contributing to rk8s is available in the Contributing Guide. Community Discord Channel: https://discord.gg/hKAypQUEzE