A simple containerized application manage system like Kubernetes, but written in Rust

Overview

rMiniK8s

A simple dockerized application management system like Kubernetes, written in Rust, plus a simple FaaS implementation.

Course Project for SJTU-SE3356, 2022.

Features

  • Nodes
    • Registration and status update
    • Label modification
  • Pods
    • Multiple containers inside single pod
    • Shared volumes
    • Resource limits
    • Round-robin scheduling over multiple nodes with node selector support
    • Query logs and attach shell
  • Services
    • Round-robin load balancing
    • Overlay network over multiple nodes
  • ReplicaSets
    • Reconciliation to desired replicas count
  • Horizontal Pod Autoscalers
    • Horizontal autoscaling based on CPU/Memory metrics
    • Scale policy and behavior
  • Ingresses
    • Connect to services via domain name
    • Routing based on URL path
  • GPU Jobs
    • Submit CUDA jobs to HPC server and return results
  • Fault Tolerance
    • Pod containers auto recovery
    • Re-synchronization after API server restart
  • Serverless (FaaS)
    • Scale-to-zero and horizontal autoscaling
    • Function workflow with conditional branch
  • rKubectl
    • Create, get, describe, patch and delete
    • Shell auto-completion

Architecture Overview

image image

Refer to Document and Presentation for further information.

Getting Started

Using Automation Scripts

Use ./scripts/ARCH/master/up.sh to deploy the control plane and ./scripts/ARCH/node/up.sh to deploy a node. Only ARM architecture is supported and tested currently.

P.S. You may want to build the dependencies(docker images, binaries) and set up a local registry first. Refer to the script for further information.

Manually

Manual deployment works on both x86 and Arm architecture, and allows you to test only part of the components and features.

First of all, build all components using cargo build, and deploy a etcd server, then start API Server using cargo run -p api_server. You can find help on rKubectl using rkubectl help. Configuration file templates and example resource definitions are available under examples directory.

Now, deploy the components needed based on the following rules:

License

This project is licensed under the GPL license.

You might also like...
App Engine Rust boilerplate

Rust App Engine This projects is a minimal boilerplate ro run Rust web application inside Google App Engine. To deploy it use Google Cloud Shell: ```s

A buildpack for Rust applications on Heroku, with full support for Rustup, cargo and build caching.

Heroku buildpack for Rust This is a Heroku buildpack for Rust with support for cargo and rustup. Features include: Caching of builds between deploymen

oci-image and oci-runtime spec in rust.

oci-lib Oci-Spec for your container runtime or container registry. Oci-lib is a rust port for original oci spec written in go. Following crate contain

Experimental implementation of the oci-runtime in Rust

youki Experimental implementation of the oci-runtime in Rust Overview youki is an implementation of runtime-spec in Rust, referring to runc. This proj

youki is an implementation of the OCI runtime-spec in Rust, similar to runc.
youki is an implementation of the OCI runtime-spec in Rust, similar to runc.

youki is an implementation of the OCI runtime-spec in Rust, similar to runc.

Container monitor in Rust

Conmon-rs A pod level OCI container runtime monitor. The goal of this project is to provide a container monitor in Rust. The scope of conmon-rs encomp

Rust client for the huggingface hub aiming for minimal subset of features over `huggingface-hub` python package

This crates aims to emulate and be compatible with the huggingface_hub python package. compatible means the Api should reuse the same files skipping d

Rust library for whisper.cpp compatible Mel spectrograms
Rust library for whisper.cpp compatible Mel spectrograms

Mel Spec A Rust implementation of mel spectrograms aligned to the results from the whisper.cpp, pytorch and librosa reference implementations and suit

H2O Open Source Kubernetes operator and a command-line tool to ease deployment (and undeployment) of H2O open-source machine learning platform H2O-3 to Kubernetes.
H2O Open Source Kubernetes operator and a command-line tool to ease deployment (and undeployment) of H2O open-source machine learning platform H2O-3 to Kubernetes.

H2O Kubernetes Repository with official tools to aid the deployment of H2O Machine Learning platform to Kubernetes. There are two essential tools to b

Kubernetes operator for declaratively deploying wasmCloud applications (via wadm) and hosts on Kubernetes.

wasmcloud-operator An operator for managing a set of wasmCloud hosts running on Kubernetes and manage wasmCloud applications using wadm. The goal is t

Ingraind - a security monitoring agent built around RedBPF for complex containerized environments and endpoints.
Ingraind - a security monitoring agent built around RedBPF for complex containerized environments and endpoints.

ingraind is a security monitoring agent built around RedBPF for complex containerized environments and endpoints. The ingraind agent uses eBPF probes to provide safe and performant instrumentation for any Linux-based environment.

A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process

teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process

A Kubernetes implementation of the Open Application Model specification

Rudr 🚨 NOTE: Rudr is deprecated in favor of the upcoming open application platform project as its successor. There are no plans to produce future rel

KFtray - A tray application that manages port forwarding in Kubernetes.
KFtray - A tray application that manages port forwarding in Kubernetes.

Ktray is written in Rust and React, with Tauri framework. The app simplifies the process of starting and stopping multiple port forwarding configurations through a user-friendly interface.

Easily embed and manage assets for your web application to build standalone-executables. Offers filename hashing, templating and more.

reinda: easily embed and manage assets This library helps you manage your assets (external files) and is mostly intended to be used in web application

The application that can be used for personal usage to manage jira from terminal.

Jira Terminal This application can be used for personal usage to manage jira from terminal. Installation This application can be used in multiple plat

The objective of this mini-project is to create a command line application to manage a collection of multimedia files

Gestionnaire de fichiers multimédia L’objectif de ce mini-projet est de créer une application en ligne commande pour gérer une collection de fichiers

Verbump - A simple utility written in rust to bump and manage git semantic version tags.

Verbump - A simple utility written in rust to bump and manage git semantic version tags.

The tool like Browserslist, but written in Rust.

browserslist-rs The tool like Browserslist, but written in Rust. Try it out Before trying this crate, you're required to get Rust installed. Then, clo

Comments
  • Very tiny suggestion about Rust grammar

    Very tiny suggestion about Rust grammar

    @y-young

    When very briefly wandering around this project, attracted by @y-young, I see a very very tiny issue, and just post it here as a small practice to Rust:

    https://github.com/markcty/rMiniK8s/blob/35b2c30064f9d203f76af0752635ccf67b246424/controllers/src/ingress/nginx_ingress_config.rs#L101

        pub fn add_path(&mut self, path: &String, svc_ip: &Ipv4Addr, svc_port: &u16) {
            self.paths.push(IngressPath {
                path: path.to_owned(),
                ip: svc_ip.to_owned(),
                port: svc_port.to_owned(),
            });
        }
    

    I am not sure about the following:

    1. Is &str better than &String?
    2. Is u16 more efficient than &u16 when passing an argument?
    3. If the user of this method do not need path/src_ip anymore, currently the add_path still makes a copy of it. If we change the signature to path: String and remove to_owned(), maybe we can remove a memory copy in such case.
    enhancement 
    opened by fzyzcjy 0
Owner
markcty
markcty
Rust Kubernetes client and controller runtime

kube-rs Rust client for Kubernetes in the style of a more generic client-go, a runtime abstraction inspired by controller-runtime, and a derive macro

kube-rs 1.8k Jan 8, 2023
A tiny minimal container runtime written in Rust.

vas-quod A tiny minimal container runtime written in Rust. The idea is to support a minimal isolated containers without using existing runtimes, vas-q

flouthoc 438 Dec 26, 2022
Shallow Container is a light-weight container tool written in Rust.

Shallow Container is a light-weight container tool written in Rust. It is totally for proof-of-concept and may not suit for production environment.

Rui Li 14 Apr 8, 2022
Easy to use, extendable, OCI-compliant container runtime written in pure Rust

PURA - Lightweight & OCI-compliant container runtime Pura is an experimental Linux container runtime written in pure and dependency-minimal Rust. The

Branimir Malesevic 73 Jan 9, 2023
Automated builded images for rust-lang with rustup, "the ultimate way to install RUST"

rustup Automated builded images on store and hub for rust-lang with musl added, using rustup "the ultimate way to install RUST". tag changed: all3 ->

刘冲 83 Nov 30, 2022
docker-rust — the official Rust Docker image

About this Repo This is the Git repo of the Docker official image for rust. See the Docker Hub page for the full readme on how to use this Docker imag

The Rust Programming Language 321 Dec 11, 2022
Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.

rust-musl-builder: Docker container for easily building static Rust binaries Source on GitHub Changelog UPDATED: Major updates in this release which m

Eric Kidd 1.3k Jan 1, 2023
Very small rust docker image

mini-docker-rust Very small rust docker image. This is an example project on how to build very small docker images for a rust project. The resulting i

null 155 Jan 1, 2023
Docker images for compiling static Rust binaries using musl-cross

rust-musl-cross Docker images for compiling static Rust binaries using musl-cross-make, inspired by rust-musl-builder Prebuilt images Currently we hav

messense 365 Dec 30, 2022
A wasm template for Rust to publish to gh-pages without npm-deploy

Wasm template for Rust hosting without npm-deploy on github pages using Travis script It automatically hosts you wasm projects on gh-pages using a tra

Siddharth Naithani 102 Dec 24, 2022