Kontainers Platform Runners
Prerelease Software Notice
Kontainers is currently prerelease software and is subject to breaking
changes until version 1.0.0
is released.
Runners, or platform runners, enable Kontainers to support various backends. Currently, Docker and Kubernetes are supported. Kontainers uses Kotlin delegation to extract implementation specific information from platform runners. Platform delegation is an advanced topic that will be documented in the future.
This document explains how to configure Docker & Kubernetes to work with Kontainers.
Docker Kontainers Runner
info
Currently, the Docker Runner requires Docker to be listening on the local
/var/run/docker.sock
. This is the default for Docker Desktop and Docker on
Linux. Environment variables like DOCKER_HOST
are currently ignored.
The Docker Platform Runner launches containers on the default Docker network. The Docker Runner is the default runner. It does not require any specific configuration.
Kubernetes Kontainers Runner
info
The Kubernetes runner is primarily targeted at the use case of launching Kontainers from a pod running on a Kubernetes cluster, such as with Kubernetes hosted CI/CD environments.
While it is possible to run Kontainers on Kubernetes from a host machine onto Minikube or K3S, this use case can be difficult to support. Additionally, it requires a Linux Host.
The Kubernetes Runner launches containers into a configurable namespace. The namespace must exist on the target cluster. To use the Kubernetes Runner, you must configure Kontainers using either environment variables or a properties file.
This guide provides information about how to set up Kontainers for running on popular CI/CD platforms that support Kubernetes.
Local Configuration
It can be useful to create a dedicated properties file on your development machine to configure Kontainers while using environment variables in your CI/CD environment. This arrangement keeps Kontainers configuration build system agnostic.
namespace=kontainers
runnerName=kubernetes
Minikube Configuration
Docker Desktop Kubernetes
danger
Deploying Docker Desktop's built in Kubernetes is currently not supported. Docker Desktop has limited support for service port mapping and fails to support multiple containers that want to expose the same port.