- Install Flox
- Install the Flox
containerdruntime 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 forrpm 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
containerdversion - Downloading and installing the correct runtime shim version
- Updating the
containerdconfiguration as necessary - Restarting
containerd
root on each node that will host Imageless Kubernetes pods.
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: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.
-
Check the
containerdversion on the node. Use the-2xshim package forcontainerd2.x and the-17package for 1.7.On K3s,containerdis not on thePATH. Use: -
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 setFLOX_FLOXHUB_TOKENon nodes without a browser. See Authentication for details.Keep this directory in place; the symlink in the next step points into it. -
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.
- containerd
- K3s
-
Add the Flox runtime configuration to
/etc/containerd/config.toml. Check theversionline in the file and use the matching configuration below.version = 2version = 3 -
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.
-
Label your nodes with the following command:
-
Update the
nodeSelectorin the followingRuntimeClassdefinition to match thelabelspecified above.RuntimeClass.yaml -
Apply this resource with the following command:
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 samplePod 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:
Listening on http://:8080 once the flox/echoip environment is running.