The Tabernetes project has prepared tools for creating a Kubernetes cluster, nodes for running isolated containers in which are executed in the tabs of web browsers of enthusiasts who are ready to provide their computing resources. As an example, a demo cluster has been put into operation, to create a node in which you just need to click on the link or scan the QR code on your smartphone. To run Linux containers in a web browser, an OCI runtime tabc, similar to runc, was created. The Linux kernel uses the WebAssembly build of kernel 7.3 from the unkernel project. The tabc runtime and tabernetes runtime code are written in Go and are distributed under the MIT license.
Tabernetes provides an implementation of kubelet (agent) for registering nodes running on the web browser side in the Kubernetes platform. The Tabernetes agent runs on the server along with the Kubernetes API server. After registering a node, the Kubernetes work scheduler transfers to it pod with a container that runs in a browser tab running the WebAssembly build of the Linux kernel.
Closing the tab results in the termination of the node and the transfer of the pod to another node, as in a traditional cluster based on real hardware. While the pod is running, the tab displays a terminal, with which you can get shell access to the Linux environment running in the container. As examples of nodes launched in tabs, containers with a distributed image generation system, a web server and a Redis DBMS have been prepared. The cluster is managed using the standard “kubectl” utility; for example, to view all available nodes you can run the command “kubectl get nodes -o wide”.
One cluster can contain both nodes running in browser tabs and stationary nodes based on individual servers. Interaction with the API server and Kubernetes scheduler is carried out through a constantly maintained WebSocket connection. When you open a new tab with a node, the handler on the node launch page connects to the Tabernetes server agent, which registers the new node. After this, the Kubernetes scheduler assigns a pod to this node and the Tabernetes agent creates a network namespace and allocates an address for the pod, after which it launches the container in the tab using the runtime tabc.