README
¶
kind
- k
ubernetes in
d
ocker
kind
is a tool for running local Kubernetes clusters using Docker container "nodes".
kind
is primarily designed for testing Kubernetes 1.11+, initially targeting the conformance tests.
If you have go and docker installed go get sigs.k8s.io/kind && kind create cluster
is all you need!

kind
consists of:
- Go packages implementing cluster creation, image build, etc.
- A command line interface (
kind
) built on these packages. - Docker image(s) written to run systemd, Kubernetes, etc.
kubetest
integration also built on these packages (WIP)
kind
bootstraps each "node" with kubeadm. For more details see the design documentation.
NOTE: kind
is still a work in progress, see docs/roadmap.md.
Installation and usage
You can install kind
with go get sigs.k8s.io/kind
. This will put kind
in
$(go env GOPATH)/bin
. You may need to add that directory to your $PATH
as
shown here if you encounter the error
kind: command not found
after installation.
To use kind
, you will need to install docker.
Once you have docker running you can create a cluster with kind create cluster
To delete your cluster use kind delete cluster
To create a cluster from Kubernetes source:
- ensure that Kubernetes is cloned in
$(go env GOPATH)/src/k8s.io/kubernetes
- build a node image and create a cluster with
kind build node-image && kind create cluster --image kindest/node:latest
Multi-node clusters and other advanced features may be configured with a config
file, for more usage see the docs or run kind [command] --help
Community, discussion, contribution, and support
Please reach out for bugs, feature requests, and other issues!
The maintainers of this project are reachable via:
- Kubernetes Slack in the #kind channel
- filing an issue against this repo
- The Kubernetes SIG-Testing Mailing List
Current maintainers (approvers) are @BenTheElder and @munnerz - feel free to reach out if you have any questions!
Pull Requests are very welcome!
See the issue tracker if you're unsure where to start, or feel free to reach out to discuss.
See also: the Kubernetes community page.
Why kind?
- kind supports building Kubernetes release builds from source
- kind supports building Kubernetes with make/bash/docker, bazel, or installing from apt, in addition to pre-published builds.
- kind is written in go, and can be used as a library, has binary releases
- kind supports windows in addition to mac and linux
- for more details see the design documentation
Alternatives
Some other open source projects with slightly different but very overlapping use cases, features etc.
- https://github.com/kubernetes-sigs/kubeadm-dind-cluster
- https://github.com/kinvolk/kube-spawn
- https://github.com/kubernetes/minikube
- https://github.com/danderson/virtuakube
- https://github.com/ubuntu/microk8s
Code of conduct
Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
kind
Package kind implements the root kind cobra command, and the cli Main()
|
Package kind implements the root kind cobra command, and the cli Main() |
kind/build
Package build implements the `build` command
|
Package build implements the `build` command |
kind/create
Package create implements the `create` command
|
Package create implements the `create` command |
kind/create/cluster
Package cluster implements the `create cluster` command
|
Package cluster implements the `create cluster` command |
kind/delete
Package delete implements the `delete` command
|
Package delete implements the `delete` command |
kind/delete/cluster
Package cluster implements the `delete` command
|
Package cluster implements the `delete` command |
kind/export
Package export implements the `export` command
|
Package export implements the `export` command |
kind/export/logs
Package logs implements the `logs` command
|
Package logs implements the `logs` command |
kind/get
Package get implements the `get` command
|
Package get implements the `get` command |
kind/get/clusters
Package clusters implements the `clusters` command
|
Package clusters implements the `clusters` command |
kind/get/kubeconfigpath
Package kubeconfigpath implements the `kubeconfig-path` command
|
Package kubeconfigpath implements the `kubeconfig-path` command |
kind/version
Package version implements the `version` command
|
Package version implements the `version` command |
images
|
|
base/entrypoint
Entrypoint implements a small docker image entrypoint that waits for SIGUSR1 before execing os.Args[1:]
|
Entrypoint implements a small docker image entrypoint that waits for SIGUSR1 before execing os.Args[1:] |
pkg
|
|
build
Package build implements functionality to build the kind images
|
Package build implements functionality to build the kind images |
build/base
Package base implements functionality to build the kind base image
|
Package base implements functionality to build the kind base image |
build/base/sources
Package sources contains the baked in sources kind needs to build.
|
Package sources contains the baked in sources kind needs to build. |
build/kube
Package kube implements functionality to build Kubernetes for the purposes of installing into the kind node image
|
Package kube implements functionality to build Kubernetes for the purposes of installing into the kind node image |
build/node
Package node implements functionality to build the kind node image
|
Package node implements functionality to build the kind node image |
cluster
Package cluster implements kind kubernetes-in-docker cluster management
|
Package cluster implements kind kubernetes-in-docker cluster management |
cluster/config
Package config implements the current apiVersion of the `kind` Config along with some common abstractions +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
|
Package config implements the current apiVersion of the `kind` Config along with some common abstractions +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta |
cluster/config/defaults
Package defaults contains cross-api-version configuration defaults
|
Package defaults contains cross-api-version configuration defaults |
cluster/config/encoding
Package encoding implements utilities for decoding from yaml the `kind` Config
|
Package encoding implements utilities for decoding from yaml the `kind` Config |
cluster/config/v1alpha1
Package v1alpha1 implements the v1alpha1 apiVersion of the `kind` Config +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
|
Package v1alpha1 implements the v1alpha1 apiVersion of the `kind` Config +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta |
cluster/config/v1alpha2
Package v1alpha2 implements the v1alpha2 apiVersion of the `kind` Config that introduces multi node support +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
|
Package v1alpha2 implements the v1alpha2 apiVersion of the `kind` Config that introduces multi node support +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta |
cluster/constants
Package constants contains well known constants for kind clusters
|
Package constants contains well known constants for kind clusters |
cluster/logs
Package logs contains tooling for obtaining cluster logs
|
Package logs contains tooling for obtaining cluster logs |
cluster/nodes
Package nodes contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster
|
Package nodes contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster |
docker
Package docker contains helpers for working with docker This package has no stability guarantees whatsoever! Package docker contains helpers for working with docker This package has no stability guarantees whatsoever!
|
Package docker contains helpers for working with docker This package has no stability guarantees whatsoever! Package docker contains helpers for working with docker This package has no stability guarantees whatsoever! |
exec
Package exec contains an interface for executing commands, along with helpers TODO(bentheelder): add standardized timeout functionality & a default timeout so that commands cannot hang indefinitely (!)
|
Package exec contains an interface for executing commands, along with helpers TODO(bentheelder): add standardized timeout functionality & a default timeout so that commands cannot hang indefinitely (!) |
fs
Package fs contains utilites for interacting with the host filesystem in a docker friendly way
|
Package fs contains utilites for interacting with the host filesystem in a docker friendly way |
kustomize
Package kustomize contains helpers for working with embeded kustomize commands
|
Package kustomize contains helpers for working with embeded kustomize commands |
log
Package log contains logging related functionality Package log contains logging related functionality
|
Package log contains logging related functionality Package log contains logging related functionality |
log/fidget
Package fidget implements CLI functionality for bored users waiting for results
|
Package fidget implements CLI functionality for bored users waiting for results |