1.6 KiB
Design
This is the root design documentation for kind. See also the project
README.md.
Overview
kind or kubernetes in ddocker is a suite of tooling for local kubernetes
"clusters" where each "node" in the cluster is a docker container running on the
same local machine.
kind is divided into go packages implementing most of the functionality, a
command line for users, and a "node" base image. The intent is that the kind
the suite of packages should eventually be importable and reusable by other
tools (e.g. kubetest)
while the CLI provides a quick way to use and debug these packages.
The Node Image
The "node" image is a small-ish Docker image for running nested containers, systemd, and kubernetes components.
To do this we need to set up an environment that will meet the CRI (currently just docker) and systemd's particular needs. Documentation for this is fairly detailed inline to the image's Dockerfile), but essentially:
-
we preinstall tools / packages expected by systemd/docker/kubernetes other than Kubernetes itself.
-
we install a custom entrypoint that allows us to perform some actions before the container truly boots
-
we set up a systemd service to forward journal logs to the container tty
-
we do a few tricks to minimize unnecessary services and inform systemd that it is in docker. (see the Dockerfile)