kind
Create Kubernetes clusters using Docker containers
TLDR
Create a local Kubernetes cluster
Delete one or more clusters
Get details about clusters, nodes, or the kubeconfig
Export the kubeconfig or the logs
SYNOPSIS
kind command [flags]
Common commands:
kind create cluster
kind delete cluster
kind get clusters
kind kubeconfig
kind load docker-image
PARAMETERS
--name string
Name of the cluster to operate on. Defaults to 'kind'.
--config string
Path to a kind config file for cluster creation or modification.
--image string
Node image to use for the cluster (e.g., kindest/node:vX.Y.Z).
--wait duration
Wait for control plane to become ready, e.g., '5m' for 5 minutes. Defaults to '0s'.
--retain
Retain nodes for debugging when a cluster creation fails.
--kubeconfig string
Path to the kubeconfig file to write to (for create) or read from (for delete).
--verbosity int
Logging verbosity level. Higher numbers provide more detailed output.
DESCRIPTION
Kind (Kubernetes IN Docker) is a tool designed to run local Kubernetes clusters using Docker containers as nodes. It was created to facilitate the testing of Kubernetes itself, but has since become a a popular choice for local development, CI/CD pipelines, and learning Kubernetes. By leveraging Docker, kind offers a lightweight and ephemeral solution for spinning up isolated Kubernetes environments quickly. Each node in the cluster is represented by a Docker container, making it easy to create multi-node clusters on a single machine without the overhead of virtual machines. This approach ensures consistent behavior across different environments and simplifies the setup process for developers. Kind supports multi-cluster setups, image loading from Docker to cluster nodes, and highly configurable cluster topologies via a YAML configuration file. It provides a robust, production-grade Kubernetes cluster locally, mimicking the behavior of a cloud-based cluster, making it ideal for validating deployments and experimenting with Kubernetes features before deploying to staging or production environments.
CAVEATS
Kind requires Docker to be installed and running on the host system. While efficient, running multi-node clusters can consume significant system resources (CPU, RAM, disk) depending on the cluster size and workload. It's primarily designed for testing and development, not for production deployments. Network configurations within Docker can sometimes pose challenges for complex setups.
INSTALLATION
Kind is typically installed by downloading pre-built binaries, using a package manager like Homebrew on macOS, or via go install if Go is installed. It's not a standard package available through apt or yum for most Linux distributions, as it's a Kubernetes tool rather than a core OS utility.
CONFIGURATION
Kind clusters can be extensively configured using a YAML configuration file specified with the --config flag. This allows for defining custom node images, Kubernetes versions, API server port, network configuration, and multi-node setups, including control plane and worker nodes.
HISTORY
Kind emerged from the Kubernetes community, specifically developed by Kubernetes SIGs (Special Interest Groups). Its primary motivation was to enable efficient and reliable end-to-end testing of Kubernetes itself, ensuring that new features and bug fixes behaved as expected across various Kubernetes versions. Over time, its utility extended beyond just testing, becoming a widely adopted tool for local Kubernetes development and CI/CD environments due to its simplicity, speed, and reliance on Docker. It continues to be actively maintained by the Kubernetes project.
SEE ALSO
docker(1): The containerization platform kind relies on., kubectl(1): The command-line tool for interacting with Kubernetes clusters, including those created by kind., minikube: Another popular tool for running local Kubernetes clusters, often using virtual machines., k3s: A lightweight, certified Kubernetes distribution.