talira

Run local Kubernetes clusters using Docker container nodes

open sourceApache-2.0self-hostablefree

kind (Kubernetes IN Docker) runs Kubernetes clusters whose nodes are containers, using Docker, Podman or nerdctl. It was built to test Kubernetes itself, and it's also used for local development and CI: a cluster starts with kind create cluster, each node is bootstrapped with kubeadm, and a YAML config file adds workers or several control-plane nodes for high availability. You choose the Kubernetes version by node image, can build a node image from Kubernetes source, and load local images into the cluster without a registry. It's a CNCF certified conformant Kubernetes installer, a Kubernetes SIG Testing project, and its Go packages can be used as a library.

Ways to install

Problems it solves

  • spin up a throwaway Kubernetes cluster inside a CI job to run integration tests
  • test my operator or controller against a real API server without a cloud account
  • a multi-node cluster with several control-plane nodes on my laptop to test high availability
  • build Kubernetes from source and run a cluster from my build to test a patch
  • run my Helm chart's tests against several Kubernetes versions in a pipeline
  • load an image I just built straight into the test cluster without pushing it anywhere
  • a disposable local cluster I can create and delete in seconds
  • run Kubernetes clusters in containers with rootless Podman instead of Docker
  • map ports from my local cluster's nodes to my machine to test an ingress
  • collect all the logs from a failed test cluster before it's torn down
  • create test clusters from Go code in my end-to-end test suite
  • turn on alpha Kubernetes feature gates in a local cluster to try them out

Features

  • Kubernetes nodes as Docker, Podman or nerdctl containers, detected automatically
  • multi-node clusters, including several control-plane nodes for HA
  • nodes bootstrapped with kubeadm; kubeadm config and feature gates set in the cluster config
  • Kubernetes version chosen by node image, pinned by digest
  • builds node images from Kubernetes source, a release, a URL or a tarball
  • kind load docker-image and kind load image-archive
  • extraPortMappings to expose node ports on the host
  • kind export logs
  • Go packages for cluster creation and image builds
  • prebuilt node images for AMD64 and ARM64
View 1 more
  • CNCF certified conformant Kubernetes installer

Limitations

  • Can't reach cluster nodes by IP address on macOS or Windows: Docker runs the node containers inside a VM there4
  • Doesn't work with Windows containers: they can't run Docker in Docker, which kind needs4

Capabilities

Has a command line toolplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what kind does.

  1. vCluster Tenant clusters: isolated Kubernetes clusters with their own API server, CRDs and RBAC
  2. k3d Little helper to run CNCF's k3s in Docker
  3. minikube Run a local Kubernetes cluster on macOS, Linux and Windows
  4. MicroK8s Zero-ops, pure-upstream, HA Kubernetes, from developer workstations to production
  5. OpenShift Local A minimal OpenShift Container Platform 4 cluster on your local computer

Compare kind with the top 3