Menu

1 / 9

Give the RAM back to your pods: a 12 MB Kubernetes worker

DEV Community: rust·Aleksey Gubanov·3 days ago
#BlNrjRn9
#devtorust#devto#dev#krab#agent
Reading 0:00
15s threshold

A k3s agent with nothing on it takes 94 MB. Start 20 busybox pods that only sleep and the node is at 268 MB. krab, a single Rust binary doing the same job on the worker, sits at 12 and 42.

Where the memory goes

What gets replaced

Try it on a spare Linux box

Grab a join command from the cluster:

kubeadm token create --print-join-command

Enter fullscreen mode

Exit fullscreen mode

Then on the worker:

git clone https://github.com/telotonet/krabkube && cd krabkube sudo KRAB_VERSION = v0.2.8 sh deploy/install.sh sudoedit /etc/krab/agent.env sudo sh -c 'umask 077; cat > /etc/krab/join-token' sudo systemctl enable --now krab-agent

Enter fullscreen mode

Exit fullscreen mode

The cluster needs some RBAC and a CSR approval first, it's all in the setup doc .

Does it hold up?

A small site (Postgres, Redis, an API, nginx and friends) on a 2 vCPU VM:

Two hours of non-stop rollouts:

CI runs 49 behaviour checks on kubeadm 1.30 to 1.34, and NodeConformance is at 152 of 166.

The catch

It's beta.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.