Kind (Kubernetes IN Docker) creates complete Kubernetes clusters by using Docker containers as nodes. Where a real Kubernetes installation needs several machines or VMs, Kind runs everything in containers, with no VM to boot, so a cluster is quick to create and destroy.
The idea is simple: each "machine" of your Kubernetes cluster is actually a Docker container. The control-plane runs in one container, the workers in other containers. Docker handles the isolation and the network between them. This principle is enough for CI/CD tests, local development and learning.
This guide shows you how to install Kind, understand how it works internally, create clusters with different topologies, and fix common problems.
What you will learn
- Create a disposable cluster for dev/CI with one command, no VM to boot
- Build a multi-node cluster (workers) to simulate a real environment
- Configure a multi control-plane cluster to test high availability
- Expose your applications with extraPortMappings and NodePort
- Load your local Docker images without going through a registry
- Set up a local registry for a smooth development workflow
- Troubleshoot common problems
When to choose Kind (and when to avoid it)
Kind, Minikube and K3s can all run Kubernetes on a single machine, with different approaches. The table below compares them.
| Criterion | Kind | Minikube | K3s |
|---|---|---|---|
| Use case | CI/CD, tests, disposable clusters | Local dev, learning | Edge / IoT / homelab, light production |
| Datastore | etcd (kubeadm) in the control-planes | etcd (kubeadm), stacked HA | SQLite (default); embedded etcd (HA) |
| Multi-node | Yes, via YAML config | Yes, --nodes | Yes, native (server/agent) |
| HA control plane | Yes, multiple control-planes (Envoy) | Yes, --ha (min. 3 CP) + kube-vip | Yes, embedded etcd (min. 3 servers) |
| Resources | No published minimum for running a cluster | 2 CPU, 20 GB disk (default) | Agent ~275 MiB, Server ~1.6 GiB |
| GPU | To configure yourself | Yes, --gpus (Docker driver) | To configure (toolkit + plugin) |
| Persistence | Rather disposable | Yes, persistent profiles | Yes, system-wide cluster (systemd) |
| Installation | Docker "node" containers | VM or container depending on the driver | Binary + service (Linux) |
Why choose Kind?
Kind was created by the Kubernetes team itself to test Kubernetes, and it is also used for local development and in CI. This origin explains its strengths:
- Reproducibility: same behavior locally and in CI
- Conformance: vanilla Kubernetes, no modifications
- Multiple topologies: test realistic scenarios (HA, multiple workers)
- Lightweight: no VM, no hypervisor, just Docker
When to avoid Kind?
- GPU: Kind does not expose the host GPUs to the nodes, so you have to
configure it yourself. Minikube can do it with the
--gpusoption. - Strong isolation: containers share the host kernel. For full VM isolation, prefer Minikube with VirtualBox/KVM.
- Graphical interface: Kind is CLI-only. Minikube has a built-in dashboard.
Kind architecture
Understanding how Kind works will help you diagnose problems and configure your clusters correctly.
In a real Kubernetes cluster, each node is a machine (physical or VM) with its own operating system, its kubelet and its container runtime. Kind reproduces this architecture but replaces the machines with Docker containers.
How does it work in practice?
When you create a Kind cluster, here is what happens:
-
Docker creates a container based on the
kindest/nodeimage. This image contains a complete Linux system with systemd, kubelet, containerd, and all the Kubernetes components pre-installed. -
The container starts like a "machine": systemd starts kubelet, which in turn starts the system pods (kube-apiserver, etcd, etc.) through containerd.
-
The pods run inside the node container: inside the Docker container, it is containerd, not Docker, that runs the containers of your applications. Your pods are therefore containers nested inside a Docker container.
The key components
-
kindnetd: the CNI (Container Network Interface) provided by Kind. It handles the network between pods. It is a simple implementation based on ptp and host-local, good enough for tests but without the advanced features of Calico or Cilium.
-
Docker
kindnetwork: Kind creates a dedicated Docker bridge network. All the nodes of the cluster communicate through this network. This is why your Kind containers can see each other. -
Envoy (HA clusters): when you create several control-planes, Kind automatically adds an Envoy container in front of them. It is the single entry point for the Kubernetes API, like the virtual IP (VIP) of a real HA cluster. Up to Kind 0.31 this role was played by HAProxy: if you read older documentation, it is the same function under another name.
Prerequisites
Before installing Kind, check these prerequisites:
-
Container runtime: Docker, Podman or nerdctl installed and working
Terminal window docker --version# Docker version 29.1.3, build f52814d -
kubectl (optional but recommended): to interact with the cluster
Terminal window kubectl version --client# Client Version: v1.36.0 -
System resources: count on about 2 GB of free memory for a single-node cluster (this is the figure used in the lesson Create your first local Kubernetes cluster with kind), and more for each node you add. The Kind documentation does not publish a minimum for running a cluster; its 6 GB (8 GB recommended) apply to building a node image under Docker Desktop.
Installing Kind
Kind is distributed as a single binary. Several installation methods are available.
Release binary (recommended)
Recommended method, especially for CI: you choose the exact version.
# Download the binary (AMD64)[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.33.0/kind-linux-amd64
# Download the binary (ARM64)[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.33.0/kind-linux-arm64
# Make it executable and move it into the PATHchmod +x ./kindsudo mv ./kind /usr/local/bin/kind
# Check the installationkind version# kind version 0.33.0# Intel Mac[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.33.0/kind-darwin-amd64
# Apple Silicon (M1/M2/M3)[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.33.0/kind-darwin-arm64
chmod +x ./kindmv ./kind /usr/local/bin/kind# PowerShellcurl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.33.0/kind-windows-amd64Move-Item .\kind-windows-amd64.exe C:\Windows\kind.exePackage managers (community)
brew install kindchoco install kind# Dev option: if you have Go installedgo install sigs.k8s.io/kind@v0.33.0Create your first cluster
Let's start with the simplest case: a single-node cluster. It is enough for most development and unit tests. If you are new to Kubernetes, the lesson Create your first local Kubernetes cluster with kind does the same thing step by step; this page goes further into Kind configuration.
kind create cluster --name demo --wait 60sLet's break this command down:
-
--name demo: names the cluster. Without this flag, Kind uses "kind" by default. Always name your clusters, it avoids confusion when you have several of them. -
--wait 60s: waits until the cluster is ready before giving control back. Essential in CI to avoid race conditions where you try to deploy before the API server answers.
Creating cluster "demo" ... ✓ Ensuring node image (kindest/node:v1.37.0) 🖼 ✓ Preparing nodes 📦 ✓ Writing configuration 📜 ✓ Starting control-plane 🕹️ ✓ Installing CNI 🔌 ✓ Installing StorageClass 💾 ✓ Waiting ≤ 1m0s for control-plane = Ready ⏳ • Ready after 17s 💚Set kubectl context to "kind-demo"Each step matches a concrete action:
-
Ensuring node image: downloads the
kindest/node:v1.37.0image if it is missing. This image contains a pre-installed Kubernetes. -
Preparing nodes: creates the Docker container that will be your node.
-
Writing configuration: generates the certificates, the kubeconfig, etc.
-
Starting control-plane: starts kubelet in the container, which then starts the system pods (API server, etcd, scheduler, controller-manager).
-
Installing CNI: deploys kindnetd for the network between pods.
-
Installing StorageClass: configures local storage for PersistentVolumes.
Check that the cluster is ready:
kubectl get nodesNAME STATUS ROLES AGE VERSIONdemo-control-plane Ready control-plane 22s v1.37.0The node is Ready: the cluster is working.
Use a specific Kubernetes version
By default, Kind uses the latest supported version, v1.37.0 with Kind v0.33.0. To test compatibility with a specific version:
kind create cluster --name k8s-1-36 --image kindest/node:v1.36.4@sha256:099e049362a1526b2db71494e1947aae99bd16290d7c895f2b7ea312e3cbfaedKind v0.33.0 publishes four node images: v1.37.0, v1.36.4, v1.35.8 and v1.34.11. The first three match the versions currently maintained by the Kubernetes project, which supports only three at a time. Each Kind release provides its own list, published on the GitHub releases page.
Pin the image rather than the Kind version. An aging Kind binary keeps creating clusters, but with a Kubernetes version that falls out of support: you then learn on a cluster that nobody patches anymore.
The Kind YAML configuration
The command line is enough for a simple cluster, but real use cases need a YAML configuration. This configuration lets you define reproducible clusters, versioned in Git, and shared between developers.
Minimal structure
kind: ClusterapiVersion: kind.x-k8s.io/v1alpha4name: mon-clusterThis is equivalent to kind create cluster --name mon-cluster. The benefit
comes when you add options that cannot be expressed on the command line.
Multi-node cluster: why and how
A single-node cluster does not reflect reality. In production, you have a control-plane and several workers. Some behaviors only appear with several nodes:
- The distribution of pods across workers (scheduling)
- Pod affinities/anti-affinities
- PodDisruptionBudgets (you cannot drain a node if there is only one)
- The inter-node network behavior
kind: ClusterapiVersion: kind.x-k8s.io/v1alpha4name: multi-nodenodes: - role: control-plane - role: worker - role: workerHere, we declare 3 nodes: 1 control-plane and 2 workers. Kind will create 3 Docker containers.
kind create cluster --config kind-multi-node.yaml --wait 120skubectl get nodes -o wideNAME STATUS ROLES AGE VERSION INTERNAL-IPmulti-node-control-plane Ready control-plane 43s v1.37.0 172.26.0.4multi-node-worker Ready <none> 34s v1.37.0 172.26.0.5multi-node-worker2 Ready <none> 34s v1.37.0 172.26.0.6Note that the workers show no role (<none>). This is normal: only the
control-planes have the node-role.kubernetes.io/control-plane label.
Multi control-plane cluster (HA): test high availability
In production, a single control-plane is a SPOF (Single Point of Failure). If the API server goes down, nobody can interact with the cluster anymore. For high availability, you deploy 3 control-planes (or 5 for very large clusters).
Kind lets you simulate this architecture:
kind: ClusterapiVersion: kind.x-k8s.io/v1alpha4name: ha-clusternodes: - role: control-plane - role: control-plane - role: control-plane - role: workerWhy 3 control-planes? It comes down to etcd, the Kubernetes database. Etcd uses a consensus (Raft) that needs a majority to work. With 3 nodes, you tolerate 1 failure. With 5 nodes, 2 failures.
kind create cluster --config kind-ha.yaml --wait 180sCreating cluster "ha-cluster" ... ✓ Ensuring node image (kindest/node:v1.37.0) 🖼 ✓ Preparing nodes 📦 📦 📦 📦 ✓ Configuring the external load balancer ⚖️ ✓ Writing configuration 📜 ...Note the "Configuring the external load balancer" step. Kind automatically adds an Envoy container in front of the 3 control-planes:
docker ps --format "table {{.Names}}\t{{.Status}}" | grep ha-clusterha-cluster-external-load-balancer Up About a minuteha-cluster-control-plane3 Up About a minuteha-cluster-control-plane2 Up About a minuteha-cluster-control-plane Up About a minuteha-cluster-worker Up About a minuteThis container is not a Kubernetes node, so it does not appear in
kubectl get nodes. Its image confirms it:
docker inspect ha-cluster-external-load-balancer --format '{{.Config.Image}}'docker.io/envoyproxy/envoy:v1.36.2This component changed in Kind v0.32: it was HAProxy until then, it is Envoy since. The function is identical, only the container name and its image differ. Tutorials from before June 2026 still mention HAProxy.
Your kubeconfig points to the load balancer, not to a particular control-plane. If a control-plane goes down, Envoy routes to the others:
kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}'docker port ha-cluster-external-load-balancerhttps://127.0.0.1:351076443/tcp -> 127.0.0.1:35107The host port is picked at random at creation time, yours will be different.
extraPortMappings: expose ports to the host
A classic problem: you deploy an application in Kind, but how do you reach it from your browser?
By default, Kind nodes sit in an isolated Docker network. Your browser (on the host) cannot directly reach the Kubernetes services.
Solution: map a port of the Kind container (the "node") to a port of your
host machine. It works exactly like Docker's -p 8080:80, but applied to the
Kind container.
kind: ClusterapiVersion: kind.x-k8s.io/v1alpha4name: with-portsnodes: - role: control-plane extraPortMappings: - containerPort: 30080 # Port on the Kind node (NodePort) hostPort: 8080 # Port on your machine listenAddress: "127.0.0.1" # Listen on localhost only protocol: TCPHow does it work?
- You create a Kubernetes service of type
NodePorton port 30080 - The Kind node listens on port 30080
- Docker maps this port to port 8080 of your machine
- You open
http://localhost:8080
Complete example: deploy nginx and reach it
# Create the cluster with the port mappingkind create cluster --config kind-with-ports.yaml --wait 60s
# Deploy nginxkubectl create deployment nginx --image=nginx:1.30.7-alpine@sha256:caf4e1e032a20f9c3c5e28fc7f25ffd768ad8677b4975c54193075997b3a97e3 --port=80
# Expose it on a NodePortkubectl expose deployment nginx --type=NodePort --port=80 --target-port=80
# Force the NodePort to 30080 (otherwise Kubernetes picks a random one)kubectl patch svc nginx -p '{"spec":{"ports":[{"port":80,"nodePort":30080}]}}'
# Wait for the pod to be readykubectl wait --for=condition=ready pod -l app=nginx --timeout=60s
# Test access from your machinecurl http://127.0.0.1:8080extraMounts: share files with the nodes
Use case: you are developing an application and want to test without rebuilding the image after each change. Or you have configuration files to inject into the cluster.
extraMounts mounts a folder of your machine into the Kind container (the
"node"). This folder is then available to the pods through hostPath volumes.
kind: ClusterapiVersion: kind.x-k8s.io/v1alpha4name: with-mountsnodes: - role: control-plane extraMounts: - hostPath: /home/dev/mon-projet/dist containerPath: /app - hostPath: /home/dev/configs containerPath: /configs readOnly: true # Protection against accidental writesWarning: this is a 2-step mount:
- Host → Kind container:
extraMountsdoes this - Kind container → Pod: you must configure a
hostPathvolume in your Kubernetes manifest
apiVersion: v1kind: Podmetadata: name: mon-appspec: containers: - name: app image: nginx:1.30.7@sha256:7fad6c0dff97965adbddf28027d934b111fc0221a554315dc274712f3fba24d3 volumeMounts: - name: app-files mountPath: /usr/share/nginx/html volumes: - name: app-files hostPath: path: /app # The path INSIDE the Kind container type: DirectoryLoad local images
The problem: you built a Docker image locally
(docker build -t mon-app:v1 .), but when you deploy it in Kind, Kubernetes
cannot find it.
Why? Remember the architecture: Kind nodes use containerd, not Docker. Your image exists in the Docker daemon of your machine, but the Kind nodes have their own image store (containerd). These are two separate worlds.
There are two solutions: kind load (simple) or a local registry (recommended
for intensive development).
Method 1: kind load (for simple cases)
kind load docker-image copies an image from Docker to the Kind nodes.
# Build your image (in Docker)docker build -t mon-app:v1 .
# Copy it to the Kind clusterkind load docker-image mon-app:v1 --name demoThe command announces what it does, node by node:
Image: "mon-app:v1" with ID "sha256:1c4f325378dc..." not yet present on node "demo-control-plane", loading...Check that the image is in the node:
docker exec demo-control-plane crictl images | grep mon-appdocker.io/library/mon-app v1 221e519220e87 2.21MBWhen to use kind load?
- You test an image occasionally
- You are in CI and the image is built only once per job
- You have few images to load
When to avoid kind load?
- You iterate quickly (rebuild every 5 minutes)
- You have many images or heavy images
- You want several developers to share the images
Method 2: local registry (recommended for development)
The problem with kind load: every code change needs a rebuild, then a
kind load. It is slow and tedious.
The solution: a local registry. You push your images to localhost:5001,
and the Kind nodes pull them from this registry. It is the standard workflow of
a cloud registry (Docker Hub, GCR...) but local.
-
Create the setup script:
This script does 5 things: it creates the registry, creates the cluster, configures containerd to recognize the registry, connects the networks, and documents the registry through a ConfigMap.
kind-with-registry.sh #!/bin/shset -o errexit# 1. Create the registry container (if it does not exist yet)reg_name='kind-registry'reg_port='5001'if [ "$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)" != 'true' ]; thendocker run -d --restart=always -p "127.0.0.1:${reg_port}:5000" \--network bridge --name "${reg_name}" registry:2.8.3@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373fi# 2. Create the Kind clusterkind create cluster --name with-registry --wait 60s# 3. Configure containerd to resolve localhost:5001 to the registry# Without this step, the nodes do not know where the registry isREGISTRY_DIR="/etc/containerd/certs.d/localhost:${reg_port}"for node in $(kind get nodes --name with-registry); dodocker exec "${node}" mkdir -p "${REGISTRY_DIR}"cat <<EOF | docker exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml"[host."http://${reg_name}:5000"]EOFdone# 4. Connect the registry to the Kind network# Otherwise the nodes cannot reach the registry containerdocker network connect "kind" "${reg_name}" 2>/dev/null || true# 5. Document the registry (KEP-1755 convention)cat <<EOF | kubectl apply -f -apiVersion: v1kind: ConfigMapmetadata:name: local-registry-hostingnamespace: kube-publicdata:localRegistryHosting.v1: |host: "localhost:${reg_port}"EOF -
Run the script:
Terminal window chmod +x kind-with-registry.sh./kind-with-registry.sh -
Use the registry:
Terminal window # Tag an image for the local registrydocker pull nginx:1.30.7-alpine@sha256:caf4e1e032a20f9c3c5e28fc7f25ffd768ad8677b4975c54193075997b3a97e3docker tag nginx:1.30.7-alpine@sha256:caf4e1e032a20f9c3c5e28fc7f25ffd768ad8677b4975c54193075997b3a97e3 localhost:5001/nginx:1.30.7-alpine# Push to the registrydocker push localhost:5001/nginx:1.30.7-alpine# Deploy in Kind: the image will be pulled from the local registrykubectl create deployment nginx --image=localhost:5001/nginx:1.30.7-alpine
Managing clusters
List existing clusters
kind get clustersdemoha-clusterwith-registryEach name matches a set of Docker containers prefixed with that name.
Switch the kubectl context
Kind automatically configures your kubeconfig when a cluster is created. But if you have several clusters, you have to switch between them:
# See all the available contextskubectl config get-contexts
# Switch to a specific clusterkubectl config use-context kind-demoThe Kind context follows the kind-{cluster-name} convention.
Delete a cluster
kind delete cluster --name demoDeleting cluster "demo" ...Deleted nodes: ["demo-control-plane"]This command deletes the Docker containers and cleans up the kubeconfig. Deletion is idempotent: deleting a nonexistent cluster does not produce an error. This is handy in CI for a systematic cleanup at the end of a job.
Export logs for debugging
When something does not work, the cause is usually in the logs. Kind exports all of the cluster's logs with one command:
kind export logs ./kind-logs --name demoExporting logs for cluster "demo" to:./kind-logsYou get a complete structure:
kind-logs/├── docker-info.txt # Docker info (version, config)├── kind-version.txt # Kind version└── demo-control-plane/ # Logs per node ├── containerd.log # Container runtime logs ├── containers/ # Logs of each container (system pods) ├── inspect.json # State of the Docker container ├── journal.log # Full systemd journal ├── kubelet.log # Kubelet logs (very useful!) ├── kubernetes-version.txt └── pods/ # Pod logs per namespaceThe most useful files:
kubelet.log: pod startup errors, scheduling problemscontainerd.log: image pull errorspods/kube-system/: system pod logs (API server, etcd...)
Expose services (LoadBalancer/Ingress)
The problem: in production, you use LoadBalancer services and Kubernetes
assigns you an external IP. But Kind runs on your machine, and there is no cloud
provider to provision IPs.
As a result, your LoadBalancer services stay in EXTERNAL-IP: <pending>
forever.
The solution: cloud-provider-kind
cloud-provider-kind is a component that simulates a cloud provider for Kind. It assigns external IPs to LoadBalancer services and handles routing through Envoy containers.
# Installation through Go, pinned versiongo install sigs.k8s.io/cloud-provider-kind@v0.12.0Or download the binary of the same version from the GitHub releases.
Use a LoadBalancer
-
Start cloud-provider-kind (in a separate terminal):
Terminal window cloud-provider-kindThis process must stay running. It watches the LoadBalancer services and provisions the IPs.
-
Create a LoadBalancer service:
Terminal window # Deploy a test appkubectl create deployment echo --image=hashicorp/http-echo:0.2.3@sha256:ba27d460cd1f22a1a4331bdf74f4fccbc025552357e8a3249c40ae216275de96 \-- -text="Hello from Kind"# Expose it as a LoadBalancerkubectl expose deployment echo --type=LoadBalancer --port=80 --target-port=5678 -
Get the external IP:
Terminal window kubectl get svc echoNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEecho LoadBalancer 10.96.7.228 172.19.0.4 80:30964/TCP 18sThe
EXTERNAL-IPis now assigned, cloud-provider-kind did its job. -
Test access:
Terminal window curl http://172.19.0.4# Hello from Kind
Alternative: extraPortMappings + NodePort
If you do not want to depend on cloud-provider-kind, the extraPortMappings
approach described above works too. It is simpler but less "realistic" (no real
external IP).
Troubleshooting
Common problems and solutions
| Symptom | Likely cause | Solution |
|---|---|---|
Nodes NotReady for a long time | CNI not deployed yet | Use --wait 120s, check kubectl describe node |
connection refused on the API | API server not started | kind export logs, analyze kubelet.log |
ErrImagePull for a local image | imagePullPolicy: Always + :latest tag | Use an explicit tag (v1) or IfNotPresent |
| Port already in use | Conflict with another service | netstat -tlnp | grep <port>, change the hostPort |
| Ingress does not work (rootless) | Ports < 1024 forbidden in rootless | sysctl net.ipv4.ip_unprivileged_port_start=0 |
kind load fails | Nonexistent cluster or wrong name | Check kind get clusters, use --name |
kind load: content digest ... not found | Multi-architecture image + Docker's containerd image store | Let the cluster pull the image from the registry, kind load is only for images you build |
cgroup v1 detected warning | The host still runs cgroup v1 | Move the host to cgroup v2: Kubernetes deprecated cgroup v1, Kind warns since v0.32 |
Diagnostic commands
When something does not work, here is the debug sequence:
# 1. Is the state of the nodes good?kubectl get nodes -o widekubectl describe node <node-name> # Look for "Conditions" and "Events"
# 2. Are all the system pods Running?kubectl get pods -n kube-system# If a pod is not Running, describe it:kubectl describe pod -n kube-system <pod-name>
# 3. Are there any abnormal recent events?kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -20
# 4. Are the Kind Docker containers healthy?docker ps --filter "name=mon-cluster"docker logs mon-cluster-control-plane 2>&1 | tail -50
# 5. As a last resort: full export of the logskind export logs ./debug-logs --name mon-cluster# Then analyze kubelet.log and containerd.logProblem: "Unable to connect to the server"
This is often a kubectl context problem or a deleted cluster:
# Check the current contextkubectl config current-context
# List the existing Kind clusterskind get clusters
# If the cluster was deleted but the context still exists:kubectl config delete-context kind-mon-ancien-clusterBest practices
For CI/CD
CI is a typical use case for Kind. A few recommendations:
-
Release binary: download a specific version, not
go install latest. You want reproducible builds. -
--waitis mandatory: without this flag, your script carries on before the cluster is ready, and the first commands fail at random. -
Systematic cleanup:
kind delete clusterat the end of the job, even if the tests fail. Useafter_scriptorfinally. -
Export logs on failure: without logs, a CI failure is very hard to diagnose. Archive them as artifacts.
# GitLab CI exampletest-kubernetes: script: - kind create cluster --name ci-test --wait 120s - kubectl apply -f manifests/ - ./integration-tests.sh after_script: - kind export logs ./logs || true - kind delete cluster --name ci-test || true artifacts: when: on_failure paths: [logs/]For local development
-
Local registry: if you iterate often, the registry saves you the repeated
kind load. Setting it up takes a few minutes and pays off quickly. -
extraMounts: for hot-reload, mount your source code in the Kind node and use a pod that watches the files. -
Name your clusters: one name per project (
kind-monprojet). You can run several clusters in parallel without conflicts. -
Version your config: commit your
kind-config.yamlfile in the repo. Everybody uses the same configuration.
Security (even in dev!)
-
apiServerAddress: 127.0.0.1: by default, the API server listens only on localhost. Do not change this unless you know what you are doing. -
Kind is not for production: no in-place security updates, no support, no SLA. It is a testing tool.
-
Isolate clusters: one cluster per test environment. Do not mix tests that could interfere with each other.
Key takeaways
- Kind = Kubernetes IN Docker: Kubernetes nodes in Docker containers
- Quick installation: a single binary, no VM to boot
- Multi-node and HA: native through the YAML config
- extraPortMappings: to expose NodePorts to the host
kind load: loads a local image into the cluster- Local registry: recommended workflow for intensive development
kind export logs: gathers all the cluster logs for debugging- cloud-provider-kind: enables LoadBalancer and Ingress
Next steps
Resources
- Official site: kind.sigs.k8s.io
- GitHub: kubernetes-sigs/kind
- cloud-provider-kind: kubernetes-sigs/cloud-provider-kind
- Available images: GitHub releases