Barenetes is an open-source, reimplementation of the core Kubernetes control plane in Rust. The goal is to build a working, minimal container orchestrator from scratch.
Status: Early development. Core components are being scaffolded. Not production-ready.
Kubernetes is a powerful but complex system. Barenetes strips it down to its essential primitives, reimplementing them in safe, idiomatic Rust. The project is designed to be readable and approachable.
Key design principles:
- Minimal : only the core orchestration loop, no optional features
- Transparent : clear separation between components, explicit communication via gRPC
- Safe : Rust's type system and ownership model enforced throughout
Barenetes is a Cargo workspace composed of six crates, each mirroring a real Kubernetes component (pki has no direct equivalent; it's the cluster's own mTLS bootstrap tool). All inter-component communication uses gRPC / Protocol Buffers, secured with mutual TLS.
| Crate | Equivalent | Role |
|---|---|---|
agent |
kubelet | Runs on each node, manages container lifecycle |
api |
kube-apiserver | Central hub : accepts requests and coordinates state |
barectl |
kubectl | CLI to interact with the API server |
scheduler/reconciliator |
kube-scheduler | Assigns workloads to nodes |
cni |
CNI plugin | Manages pod networking |
pki |
- | Bootstraps the cluster's private mTLS CA and certs |
Proto definitions live in proto/<component>/v1/.
git clone https://github.com/do-2k25-28/Barenetes.git
cd BarenetesBuild the entire workspace:
cargo buildBuild a single component:
cargo build -p agent
cargo build -p api
cargo build -p barectl
cargo build -p scheduler
cargo build -p cni
cargo build -p pkiRun a component:
cargo run -p apiEvery tagged release (vX.Y.Z) publishes all six binaries as GitHub Release
assets. deploy/install.sh installs them as systemd services on a control
plane and/or worker node, and always sets up a private mTLS CA for the
control plane's own services:
sudo ./deploy/install.sh --role control-plane # api + scheduler, mTLS by default
sudo ./deploy/install.sh --role worker --server https://<cp-ip>:50052 --node-name <name> # cni + agent
sudo ./deploy/install.sh --role all --node-name <name> # single-node setupThe barectl CLI is also published as a .deb, a .rpm, and a pacman
.pkg.tar.zst on each release, so it can be installed directly on
Debian/Ubuntu, Fedora/RHEL-family, and Arch-family distros. These packages
include shell completions for Bash, Zsh, and Fish:
# Debian / Ubuntu
sudo apt install ./barenetes-barectl_*.deb
# Fedora / RHEL / Rocky / AlmaLinux
sudo dnf install ./barenetes-barectl-*.rpm
# Arch / Manjaro / EndeavourOS
sudo pacman -U ./barenetes-barectl-*.pkg.tar.zstSee deploy/README.md for options (etcd, multi-node CNI
overlay, mTLS/PKI, etc.) and current limitations.
Contributions are welcome. Please open an issue before submitting a pull request for non-trivial changes so we can discuss the approach first.
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Commit your changes
- Open a pull request
Please keep PRs focused : one feature or fix per PR.
Distributed under the MIT License. See LICENSE for details.