k3s-root
June 10, 2026 ยท View on GitHub
==========
k3s-root is based on https://github.com/buildroot/buildroot and provides the userspace binaries for k3s-io/k3s
Building
k3s-root is built in docker, which means you should be able to simply make on your machine to compile. By default, make will compile for amd64. If you want to compile for other architectures, you can run commands like:
make ARCH=arm64
or alternatively, if you want to compile all architectures at once, you can run:
make all-build
If it is not the first time you build, delete the directories artifacts/ and dist/ to avoid problems when creating the symbolic link in the package step:
sudo rm -r artifacts/ dist/
The default way of building this project is through a docker container using docker buildx. While you may be able to run the build scripts standalone, we do not test or support doing so.
Upgrading to new buildroot version
To upgrade to a new buildroot version:
- Check out a new branch for your work:
git checkout -B bump-buildroot origin/master - Modify the
BUILDROOT_VERSIONin scripts/download - Run
make downloadto prepare a Docker image for further work - For each target architecture:
- Start a shell in the resulting image:
docker run --rm -it -e BUILDARCH=<ARCH> k3s-io/k3s-root:dev /bin/bash - Run
./scripts/patch - Run
cd /usr/src/buildroot && make olddefconfig - Outside the container, split changes to the buildroot
.configintobuildroot/configandbuildroot/<ARCH>config - Run
make BUILDARCH=<ARCH> - Verify if the upgrade worked correctly by comparing the old tarball and the new one. If the same files are there, then you are set. If the build failed, or some files are missing, you may need to remove or adapt patches or config for the new buildroot version.
- Start a shell in the resulting image: