Skip to content
saschagrunertPublic

About

Single dependency Kubernetes clusters for local testing, experimenting and development.

Topics

Resources

Stars

831 stars

Watchers

9 watching

Forks

Repository files navigation

KuberNix

CI codecov Docs main Docs release Dependencies Crates.io License Apache-2.0

Kubernetes development cluster bootstrapping with Nix packages

This project aims to provide single dependency Kubernetes clusters for local testing, experimenting and development purposes.

Moving pictures are worth more than a thousand words, so here is a short demo:

demo

Nix?

Have you ever heard about Nix, the functional package manager?

In case you haven’t, don’t worry, the important thing is that it provides all the third-party dependencies needed for this project, pinned to a dedicated version. This guarantees stable, reproducible installations.

KuberNix itself is a Rusty helper program, which takes care of bootstrapping the Kubernetes cluster, passing the right configuration parameters around and keeping track of the running processes.

What is inside

The following technology stack is currently being used:

Application Version
cni-plugins v1.9.1
conmon-rs v1.2.2
conntrack-tools v1.4.9
containerd v2.4.1
cri-o-wrapper v1.37.2
cri-tools v1.37.0
crun v1.30.1
etcd v3.7.3
iproute2 v7.2.0
iptables v1.8.13
kmod v31
kubectl v1.37.2
kubernetes v1.37.2
nss-cacert v3.131.1
podman v6.1.4
rootlesskit v2.3.6
runc v1.5.2
slirp4netns v1.3.7
socat v1.8.1.3
util-linux v2.42.4

Some other tools are not explicitly mentioned here, because they are not direct dependencies.

Quick Start

Install Nix, the only real dependency:

$ curl -L https://nixos.org/nix/install | sh

Then download the static binary for your architecture (kubernix-x86_64 or kubernix-aarch64) from the latest release, install it via cargo install kubernix or build it via make build-release, and start KuberNix as a regular user (rootless mode) or as root:

$ kubernix
$ sudo env "PATH=$PATH" kubernix

KuberNix sets up the Nix environment, starts the cluster with all its data in the kubernix-run directory and drops you into a shell where kubectl talks to the cluster. Exiting the shell stops the cluster. The requirements list the prerequisites of both modes.

Documentation

  • Requirements: Nix as well as the prerequisites of root and rootless mode.
  • Usage: bootstrapping, shells, status, stopping, cleanup and restarts.
  • Configuration: options, OCI runtimes, multinode clusters, networking, overlays and additional packages.
  • Architecture: the boot phases of the components.
  • Troubleshooting: fixes for unmet rootless prerequisites and other common problems.
  • Stability: the stable interfaces since 1.0 and upgrading from 0.4.
  • Verifying Releases: checksums, signatures, SBOMs, attestations and vulnerability exploitability (VEX) statements.

Contributing

You want to contribute to this project? Wow, thanks! So please just fork it and send me a pull request. The build dev shell of the flake provides all tools needed for development, for example via nix develop .#build.

About

Single dependency Kubernetes clusters for local testing, experimenting and development.

Topics

Resources

Stars

831 stars

Watchers

9 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages