Your first cluster with kind
In this lesson I create a Kubernetes cluster on my Mac, look at what it is made of and delete it again. The tool is kind short for Kubernetes in Docker, it runs each Kubernetes node as a Docker container so a whole cluster starts in well under a minute. Before you start you need Docker on the Mac. I use Colima which runs Docker in a small Linux virtual machine. One homebrew command installs Colima, Docker, Kind, Cube Control and Helm. A second one starts the virtual machine with 4 CPU cores and 8 GB of memory. Here they are as a comment because they are already done on this Mac. The check docker info answers with the size of the virtual machine, mine has 4 CPU cores and about 12 GB. 8 is enough for these cores. Here are the versions I use kind 0.33, kubectl 1.37 and helm 4.3. Each kind release has a default node image and the image decides the kubernetes version. So I pin it with the image flag kubernetes 1.37.0, the wait flag makes kind return only when the node is ready. Kind starts one container which is the whole cluster, this takes about half a minute so I speed up the video. The checklist shows the steps, the node image, the control plane, a network plugin for the pods and a storage class for volumes. Kinda wrote a context for the new cluster into my kubeconfig, the file where kubecontrol keeps its clusters and made it the current one. The star marks it. One node named Homelab control plane ready at version 1.3.7.0. In a single node cluster, the control plane also runs the workload. These are the system pods, the API server, the application programming interface that every tool talks to, etcd which stores the cluster state, the scheduler and the controller manager core DNS for names inside the cluster, kindnet for the pod network and the local path provisioner which creates volumes. You meet that one again in the storage lesson. And here is the trick of kind. The node is not a virtual machine it is a container kind that labels its containers with the cluster name so I filter on that label. One container from the pinned node image, the API server's port 6443 is published on localhost on a random port. That is how kubectl on the Mac reaches the cluster. Deleting the cluster removes the container and the context. The node image stays in Docker, so the net cluster starts faster. No container and no context, that is the whole life cycle of a kind cluster created from a pinned image, use it with cube control and delete it in seconds.