Skip to main content
This guide describes general steps for installing Imageless Kubernetes, suitable for self-managed clusters or other Kubernetes distributions (e.g. K3s). To use Imageless Kubernetes, on each node you will need to:
  • Install Flox
  • Install the Flox containerd runtime shim
  • Register the shim with containerd
  • Register the shim with Kubernetes
Imageless Kubernetes requires a minimum containerd version of 1.7.

Node configuration

Flox installation

Flox packages and installation instructions for rpm and deb based distributions are available from the Install Flox page. Flox will need to be installed on each node that will host Imageless Kubernetes pods.

Runtime shim installation

For most Kubernetes distributions, the automatic installation method is the recommended option. We also provide a manual method for those that are not supported by the automatic installer. We recommend first trying the automatic method, and only moving to the manual method if issues are encountered.

Automatic installation

We provide an installer in the form of a Flox environment that deploys Imageless Kubernetes by:
  • Detecting the installed containerd version
  • Downloading and installing the correct runtime shim version
  • Updating the containerd configuration as necessary
  • Restarting containerd
Details about the installer can be found on its FloxHub page; the script is executed by the activation hook for the environment. Once Flox is installed, the runtime shim can be installed by running the following command as root on each node that will host Imageless Kubernetes pods.
When the installation succeeds, the output includes one of these lines:
If the output includes:
then containerd is installed without a configuration file, which is the default for some packages such as Ubuntu’s. Generate the default configuration and run the installer again:

Manual installation

If you receive a message like:
when running the installer, but do have containerd installed, you can perform the installation process manually. The installer does not support Kubernetes distributions that bundle their own containerd, such as K3s. On those, use the manual method.
  1. Check the containerd version on the node. Use the -2x shim package for containerd 2.x and the -17 package for 1.7.
    On K3s, containerd is not on the PATH. Use:
  2. Create a Flox environment and install the runtime shim. Installing a package from the catalog requires you to be signed in to FloxHub. Run flox auth login, or set FLOX_FLOXHUB_TOKEN on nodes without a browser. See Authentication for details.
    Keep this directory in place; the symlink in the next step points into it.
  3. Create a symlink from the Flox environment to /usr/local/bin.
    Confirm the symlink resolves to the shim binary:
Register the shim with containerd
Add the Flox runtime to the containerd configuration and restart containerd. The steps depend on how containerd is installed on the node.
  1. Add the Flox runtime configuration to /etc/containerd/config.toml. Check the version line in the file and use the matching configuration below.
    version = 2
    version = 3
  2. Restart containerd.

Kubernetes configuration

A RuntimeClass is used to expose the runtime to Kubernetes such that it can be utilized to create pods. We recommend labeling nodes that have the runtime shim installed to ensure Flox pods are only scheduled on them. On K3s, the default kubeconfig at /etc/rancher/k3s/k3s.yaml is readable only by root, so run the kubectl commands below with sudo.
  1. Label your nodes with the following command:
  2. Update the nodeSelector in the following RuntimeClass definition to match the label specified above.
    RuntimeClass.yaml
  3. Apply this resource with the following command:
The nodeSelector ensures that Flox pods will only be scheduled on nodes with the Flox runtime installed.

Conclusion

Once the nodes have Flox and the shim installed, you are ready to create pods using the Flox runtime. A sample Pod manifest is available in the Introduction, but any Kubernetes resource that creates a pod (e.g. Deployment) can be used by setting the runtimeClassName parameter to flox. To verify the installation, save the sample manifest as pod.yaml and apply it:
The logs include Listening on http://:8080 once the flox/echoip environment is running.