krab
A 6 MiB kubelet for real Kubernetes. One static Rust binary turns a 1 GB machine into a worker node of k3s or kubeadm (1.30 to 1.34). A whole node with 20 pods takes 42 MiB instead of 268 MiB.
| Worker node, 20 busybox pods | krab agent | k3s agent |
|---|---|---|
node memory (cgroup memory.current) |
42.3 MiB | 267.5 MiB |
| node anonymous memory | 9.8 MiB | 204.1 MiB |
| idle node memory | 12.2 MiB | 94.4 MiB |
| agent process RSS, idle / 20 pods | 5 to 6 / 7 to 9 MiB | kubelet + kube-proxy + flannel: 61 / 73 MiB |
| binary | 6 MiB | 200 MiB |
krab node = agent + WireGuard + ClusterIP + DNS + youki shims + pods. k3s node = kubelet + kube-proxy + flannel + containerd + shims + pods, same method, same host, bench/RESULTS.md. The same agent measured 4.9 / 6.5 MiB on arm64 and 5.1 / 6.8 MiB on a real 1 GB VM; a 100-minute soak with pod churn stayed at 5 MiB with no growth.
Install
# on the worker, token from `kubeadm token create --print-join-command`
Requirements, RBAC and k3s notes: docs/AGENT.md.
What works
- Join: bootstrap token + CA hash, node client certificate by CSR, automatic rotation.
- Pods: init containers, restart policies, liveness/readiness/startup probes, postStart/preStop hooks,
activeDeadlineSeconds, env (fieldRef, resourceFieldRef, ConfigMap, Secret), emptyDir, hostPath (allow list), ConfigMap, Secret, projected, downwardAPI, local-path PVC, ServiceAccount tokens, live ConfigMap/Secret updates,terminationMessagePath. - kubectl:
logs,exec,attach,port-forward,top(real metrics-server). - Network: pod CIDR from the node, WireGuard between krab nodes, ClusterIP via nftables, cluster DNS.
- Node health: real Memory/Disk/PID pressure, eviction (BestEffort first), unused image GC.
- Isolation: youki with a default seccomp profile, no privileged or host-network pods, node authorizer, SubjectAccessReview on the kubelet API.
Compatibility
| Control plane | Tested |
|---|---|
| k3s 1.34 | agent suite, join with rotation, kubectl top, two-node networking |
| kubeadm 1.30 to 1.34 | containerd node next to a krab node: join, Deployment on both, logs, exec |
bench/node-checks.sh: 35 sig-node behaviour checks, all pass. CI runs the full matrix nightly and on tags.
Limitations
Beta. Not CNCF-certified, the official [Conformance] suite is not run. Worker role only, Linux, IPv4. No CSI, NetworkPolicy, hostNetwork or privileged pods. The kubelet-serving CSR needs an admin approval, as with kubelet serverTLSBootstrap. Eviction and image GC have unit tests but no load test yet. No HA control plane tests. No third-party security audit; an internal review left no open critical or high findings.
Standalone mode
krab serve also runs a tiny Kubernetes-compatible API server on a single machine (about 4 MiB). Experimental and paused; the agent is the supported way to use krab.
Development
&& &&
License
MIT.