The kube32 project enables distributed computing on low-power hardware by porting Kubernetes-like functionality to ESP32-S3 microcontrollers. While standard Kubernetes is designed for high-performance servers, kube32 adapts the architecture for resource-constrained environments. It provides a full suite of Kubernetes API endpoints—including Pods, Nodes, Namespaces, and Deployments—allowing users to manage a cluster of microcontrollers using standard tools like `kubectl` and `k9s`. The system supports cluster management over Wi-Fi or USB serial connections, effectively treating individual boards as nodes in a distributed network.
This image represents the core project providing Kubernetes-like functionality to low-power microcontrollers.
At the core of the system is a WebAssembly (Wasm) runtime powered by the `wasm3` interpreter. Instead of traditional Docker containers, kube32 executes Wasm modules as 'pods.' This approach allows for high portability and isolation while maintaining a small footprint. The project includes SDKs and templates for Rust, C, and AssemblyScript, and implements specific features such as configurable memory limits, per-call gas budgets, and a capability firewall. This firewall gates peripheral access, ensuring that individual pods can only interact with specific hardware components like GPIO pins, I2C buses, or microSD storage based on defined permissions.
The architecture distinguishes between control plane and worker nodes based on hardware capabilities. A board equipped with quad SPI PSRAM acts as the control plane, running the local kubelet and serving the API, while boards without PSRAM function as workers. The system also includes a host simulator (`kube32-sim`) for macOS and Linux, allowing developers to build and deploy pods over a network without physical hardware. For persistence, kube32 uses a CRC-checked journal on raw flash or microSD cards, supporting `persistentVolumeClaim` objects to ensure data survives across pod restarts or reboots.