-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempting to make kind a little less Docker Centric #151
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ This is the root design documentation for `kind`. See also the project | |
## Overview | ||
|
||
`kind` or **k**ubernetes **in** **d**ocker is a suite of tooling for local | ||
Kubernetes "clusters" where each "node" is a Docker container. | ||
Kubernetes "clusters" where each "node" is a container. | ||
`kind` is targeted at testing Kubernetes. | ||
|
||
`kind` is divided into go packages implementing most of the functionality, a | ||
|
@@ -35,10 +35,10 @@ In practice kind looks something like this: | |
Clusters are managed by logic in [`pkg/cluster`][pkg/cluster], which the | ||
`kind` cli wraps. | ||
|
||
Each "cluster" is identified by an internal but well-known [docker object label](https://docs.docker.com/config/labels-custom-metadata/) key, with the cluster | ||
Each "cluster" is identified by an internal but well-known [container object label](https://docs.docker.com/config/labels-custom-metadata/) key, with the cluster | ||
name / ID as the value on each "node" container. | ||
|
||
We initially offload this type of state into the containers and Docker. | ||
We initially offload this type of state into the containers. | ||
Similarly the container names are automatically managed by `kind`, though | ||
we will select over labels instead of names because these are less brittle and | ||
are properly namespaced. Doing this also avoids us needing to manage anything | ||
|
@@ -63,17 +63,17 @@ For more see [node-image.md][node-image.md]. | |
|
||
### Cluster Creation | ||
|
||
Each "node" runs as a docker container. Each container initially boots to a | ||
Each "node" runs as a container. Each container initially boots to a | ||
pseudo "paused" state, with [the entrypoint][entrypoint] waiting for `SIGUSR1`. | ||
This allows us to manipulate and inspect the container with `docker exec ...` | ||
This allows us to manipulate and inspect the container with eg `docker exec ...` | ||
and other tools prior to starting systemd and all of the components. | ||
|
||
This setup includes fixing mounts and pre-loading saved docker images. | ||
This setup includes fixing mounts and pre-loading saved container images. | ||
|
||
Once the nodes are sufficiently prepared, we signal the entrypoint to actually | ||
"boot" the node. | ||
|
||
We then wait for the Docker service to be ready on the node before running | ||
We then wait for the Docker service to be ready if we are using Docker on the node before running | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as it stands, we are only using docker for this case. |
||
`kubeadm` to initialize the node. | ||
|
||
Once kubeadm has booted, we export the [KUBECONFIG][kubeconfig], then apply | ||
|
@@ -84,7 +84,7 @@ At this point users can test Kubernetes by using the exported kubeconfig. | |
|
||
### Cluster Deletion | ||
|
||
All "node" containers in the cluster are tagged with docker labels identifying | ||
All "node" containers in the cluster are tagged with container labels identifying | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, this is searchable, I'm not sure I want to sacrifice this. docker labels have a lot of restrictions and particular behavior, what those are is probably interesting to many of our users / developers who may not have used these yet. |
||
the cluster by the chosen cluster name (default is "1"), to delete a cluster | ||
we can simply list and delete containers with this label. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# The Node Image | ||
|
||
The ["node" image][node image] is a Docker image for running | ||
The ["node" image][node image] is a container image for running | ||
nested containers, systemd, and Kubernetes components. | ||
|
||
This image is built on top of the ["base" image][base image]. | ||
|
@@ -15,7 +15,7 @@ provides most of the tools statically needed for a kubernetes deployment | |
(eg `systemd`), variants of this image have the following properties: | ||
|
||
- `/kind/images/` contains various `*.tar` files which are | ||
[Docker image archives][docker image archives], | ||
[Container image archives][container image archives], | ||
these images will be loaded by the cluster tooling prior to running `kubeadm` | ||
|
||
- `kubeadm`, `kubectl`, `kubelet` are in the path | ||
|
@@ -35,6 +35,6 @@ each "node" container with [kubeadm][kubeadm]. | |
[base image]: ./base-image.md | ||
[build package]: ./../../pkg/build | ||
[cluster package]: ./../../pkg/cluster | ||
[docker image archives]: https://docs.docker.com/engine/reference/commandline/save/ | ||
[container image archives]: https://docs.docker.com/engine/reference/commandline/save/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unless we have a generic reference for this instead, it seems like renaming this and then linking to docker is not particularly helpful. |
||
[systemd service]: https://www.freedesktop.org/software/systemd/man/systemd.service.html | ||
[kubeadm]: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# TODO | ||
|
||
A non-exhaustive list of tasks (in no-particular order) includes: | ||
- [x] basic single "node" clusters | ||
- [x] multiple clusters per host / named clusters | ||
- [x] user guide(s) | ||
- [x] more detailed user guides for common usage | ||
- [x] more detailed user guides for more advanced usage | ||
- [ ] preflight checks [WIP] | ||
- [ ] multi-node clusters | ||
- [x] cli command to list clusters | ||
- [x] support for multiple kubernetes builds: | ||
- [x] bazel build from source | ||
- [x] docker / make build from source | ||
- [x] apt (upstream / official release packages) | ||
- [ ] support for selecting a non-default package version | ||
- [ ] kubetest ingregration [WIP] | ||
- [ ] improved logging and error handling [WIP] | ||
- [x] continuous integration | ||
- [x] publish pre-built images to a registry | ||
- [x] pre-load images that are not from the build / possibly build more images | ||
- [x] etcd | ||
- [x] coreDNS | ||
- [x] Kubernetes images for released builds | ||
- [ ] overlay network images? | ||
- [ ] support multiple overlay networks | ||
- [x] support advanced configuration via config file | ||
- [x] kubeadm config template override | ||
- [x] node lifecycle hooks | ||
- [ ] more advanced network configuration (not docker0) | ||
- [ ] support for other CRI within the "node" containers (containerd, cri-o) | ||
- [ ] move all container engine functionality into a common package (`pkg/container`) [WIP] | ||
- [ ] potentially move this to using the docker client library | ||
- [x] log dumping functionality / cli commands | ||
- [ ] support audit logging | ||
- [ ] fake out all internals and unit test [WIP] | ||
- [ ] support for local registries | ||
- [ ] support for mounting extra directories | ||
|
||
# Wishlist | ||
|
||
Longer term / continually appealing items: | ||
|
||
- Improved documentation | ||
- Support for architectures / platforms other than linux / amd64 for the node images | ||
- Support for client platforms other than docker on linux / docker for mac | ||
- Less privileged containers or sharing a CRI via something like [containerd namespaces](https://github.com/containerd/containerd/blob/master/docs/namespaces.md), generally | ||
better isolation | ||
- HA kubeadm / multiple control plane nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This particular image is built from a
Dockerfile
, I'm not sure how helpful this change is.I think podman / cri-o / containerd users know that a "docker image" is not limited to Docker. :^)