[Kubernetes (K8S) Kind] Use Homebrew (brew) to install Kind Kubernetes (K8S) cluster on macOS
Kind
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.
Prerequisites
- 
Homebrew is the Missing Package Manager for macOS (or Linux).
For more information about installing and using Homebrew, see the Homebrew - https://brew.sh/.
Install Homebrew (brew).
1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
 
Installation
1  | brew install kind  | 
For more detailed instructions see the user guide - https://kind.sigs.k8s.io/docs/user/quick-start.
Create cluster
Run kind create cluster -h to get command help:
1  | kind create cluster -h  | 
Single node cluster
1  | kind create cluster  | 
Multiple nodes cluster
First, create a config file kind-multiple-control-plane.yaml.
1  | # cat kind-multiple-control-plane.yaml  | 
Then, run kind create command to create a cluster.
1  | kind create cluster --config kind-multiple-control-plane.yaml  | 
Check cluster info.
1  | kubectl cluster-info --context kind-kind  | 
Run kubect get nodes to check cluster nodes.
1  | kubectl get nodes --context kind-kind  | 
Run docker ps to cheker docker containers.
% docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED         STATUS         PORTS                         NAMES
714bb9aea94c   kindest/haproxy:v20200708-548e36db   "/docker-entrypoint.…"   6 minutes ago   Up 6 minutes   192.168.80.33:58014->6443/tcp   kind-external-load-balancer
741bd68261fa   kindest/node:v1.21.1                 "/usr/local/bin/entr…"   7 minutes ago   Up 6 minutes   127.0.0.1:50252->6443/tcp     kind-control-plane
39d98d72e35a   kindest/node:v1.21.1                 "/usr/local/bin/entr…"   7 minutes ago   Up 6 minutes                                 kind-worker2
da46761e4c49   kindest/node:v1.21.1                 "/usr/local/bin/entr…"   7 minutes ago   Up 6 minutes   127.0.0.1:50253->6443/tcp     kind-control-plane2
88f00272efe0   kindest/node:v1.21.1                 "/usr/local/bin/entr…"   7 minutes ago   Up 6 minutes                                 kind-worker
f054dd65b71e   kindest/node:v1.21.1                 "/usr/local/bin/entr…"   7 minutes ago   Up 6 minutes                                 kind-worker3
8ad315d2d8e9   kindest/node:v1.21.1                 "/usr/local/bin/entr…"   7 minutes ago   Up 6 minutes   127.0.0.1:50254->6443/tcp     kind-control-plane3
## References
[1] [kind - https://kind.sigs.k8s.io/](https://kind.sigs.k8s.io/)
[2] [Homebrew - https://brew.sh/](https://brew.sh/)
[3] [Install Tools | Kubernetes - https://kubernetes.io/docs/tasks/tools/](https://kubernetes.io/docs/tasks/tools/)
[4] [Kubernetes](https://kubernetes.io/)