README

kind

Please see Our Documentation for more in-depth installation etc.

kind is a tool for running local Kubernetes clusters using Docker container "nodes".
kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.

If you have go (1.11+) and docker installed GO111MODULE="on" go get sigs.k8s.io/kind@v0.9.0 && kind create cluster is all you need!

kind consists of:

kind bootstraps each "node" with kubeadm. For more details see the design documentation.

NOTE: kind is still a work in progress, see the 1.0 roadmap.

Installation and usage

For a complete install guide see the documentation here.

You can install kind with GO111MODULE="on" go get sigs.k8s.io/kind@v0.9.0.

NOTE: please use the latest go to do this, ideally go 1.13 or greater.

NOTE: go get should not be run from a Go [modules] enabled project directory, as go get inside a modules enabled project updates dependencies / behaves differently. Try for example cd $HOME first.

This will put kind in $(go env GOPATH)/bin. If you encounter the error kind: command not found after installation then you may need to either add that directory to your $PATH as shown here or do a manual installation by cloning the repo and run make build from the repository.

Without installing go, kind can be built reproducibly with docker using make build.

Stable binaries are also available on the releases page. Stable releases are generally recommended for CI usage in particular. To install, download the binary for your platform from "Assets" and place this into your $PATH:

On Mac & Linux:

curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.9.0/kind-$(uname)-amd64"
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind

On Mac via Homebrew:

brew install kind

On Windows:

curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.9.0/kind-windows-amd64
Move-Item .\kind-windows-amd64.exe c:\some-dir-in-your-PATH\kind.exe

# OR via Chocolatey (https://chocolatey.org/packages/kind)
choco install kind

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

Please reach out for bugs, feature requests, and other issues!
The maintainers of this project are reachable via:

Current maintainers are @BenTheElder, @munnerz, @aojea, and @amwat - feel free to reach out if you have any questions!

Pull Requests are very welcome!
If you're planning a new feature, please file an issue to discuss first.

Check the issue tracker for help wanted issues if you're unsure where to start, or feel free to reach out to discuss. 🙂

See also: our own contributor guide and the Kubernetes community page.

Why kind?

  • kind supports multi-node (including HA) clusters
  • kind supports building Kubernetes release builds from source
    • support for make / bash / docker or bazel, in addition to pre-published builds
  • kind supports Linux, macOS and Windows
  • kind is a CNCF certified conformant Kubernetes installer
Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

Documentation

Overview

    This package is a stub main wrapping cmd/kind.Main()

    Source Files

    Directories

    Path Synopsis
    cmd
    kindnetd Module
    hack
    tools Module
    images
    kindnetd Module
    pkg
    apis/config/defaults
    Package defaults contains cross-api-version configuration defaults
    Package defaults contains cross-api-version configuration defaults
    apis/config/v1alpha4
    Package v1alpha4 implements the v1alpha4 apiVersion of kind's cluster configuration +k8s:deepcopy-gen=package
    Package v1alpha4 implements the v1alpha4 apiVersion of kind's cluster configuration +k8s:deepcopy-gen=package
    build/nodeimage
    Package nodeimage implements functionality to build the kind node image
    Package nodeimage 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/constants
    Package constants contains well known constants for kind clusters
    Package constants contains well known constants for kind clusters
    cluster/nodes
    Package nodes provides a kind specific definition of a cluster node
    Package nodes provides a kind specific definition of a cluster node
    cluster/nodeutils
    Package nodeutils contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster
    Package nodeutils contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster
    cmd
    Package cmd provides helpers used by kind's commands / cli
    Package cmd provides helpers used by kind's commands / cli
    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()
    cmd/kind/build
    Package build implements the `build` command
    Package build implements the `build` command
    cmd/kind/completion
    Package completion implements the `completion` command
    Package completion implements the `completion` command
    cmd/kind/completion/bash
    Package bash implements the `bash` command
    Package bash implements the `bash` command
    cmd/kind/completion/fish
    Package fish implements the `fish` command
    Package fish implements the `fish` command
    cmd/kind/completion/zsh
    Package zsh implements the `zsh` command
    Package zsh implements the `zsh` command
    cmd/kind/create
    Package create implements the `create` command
    Package create implements the `create` command
    cmd/kind/create/cluster
    Package cluster implements the `create cluster` command
    Package cluster implements the `create cluster` command
    cmd/kind/delete
    Package delete implements the `delete` command
    Package delete implements the `delete` command
    cmd/kind/delete/cluster
    Package cluster implements the `delete` command
    Package cluster implements the `delete` command
    cmd/kind/delete/clusters
    Package clusters implements the `delete` command for multiple clusters
    Package clusters implements the `delete` command for multiple clusters
    cmd/kind/export
    Package export implements the `export` command
    Package export implements the `export` command
    cmd/kind/export/kubeconfig
    Package kubeconfig implements the `kubeconfig` command
    Package kubeconfig implements the `kubeconfig` command
    cmd/kind/export/logs
    Package logs implements the `logs` command
    Package logs implements the `logs` command
    cmd/kind/get
    Package get implements the `get` command
    Package get implements the `get` command
    cmd/kind/get/clusters
    Package clusters implements the `clusters` command
    Package clusters implements the `clusters` command
    cmd/kind/get/kubeconfig
    Package kubeconfig implements the `kubeconfig` command
    Package kubeconfig implements the `kubeconfig` command
    cmd/kind/get/nodes
    Package nodes implements the `nodes` command
    Package nodes implements the `nodes` command
    cmd/kind/load
    Package load implements the `load` command
    Package load implements the `load` command
    cmd/kind/load/docker-image
    Package load implements the `load` command
    Package load implements the `load` command
    cmd/kind/load/image-archive
    Package load implements the `load` command
    Package load implements the `load` command
    cmd/kind/version
    Package version implements the `version` command
    Package version implements the `version` command
    errors
    Package errors provides common utilities for dealing with errors
    Package errors provides common utilities for dealing with errors
    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 utilities for interacting with the host filesystem in a docker friendly way TODO(bentheelder): this should be internal
    Package fs contains utilities for interacting with the host filesystem in a docker friendly way TODO(bentheelder): this should be internal
    log
    Package log defines a logging interface that kind uses This is roughly a minimal subset of klog github.com/kubernetes/klog
    Package log defines a logging interface that kind uses This is roughly a minimal subset of klog github.com/kubernetes/klog