Create a Kind cluster

Kubernetes in Docker: the fastest cluster to create and throw away. Good for laptops, workshops and CI sandboxes.

  1. Review the options
  2. Create the cluster
  3. Verify
  4. Add utilities
  5. Tear down
  6. Learn more

Review the options

Kind reads kindCluster in master.yaml. List what is supported and the current values:

./scripts/setup.sh config --list kind
Option Values
numberOfNodes, image Node count and kindest/node image
networking CNI: default, Calico, Flannel, Cilium (with disableDefaultCNI); kubeProxyMode
loadbalancer cloud-provider-kind, metallb, cilium-ipam-lb
ingress Traefik: ports, allowCrossNamespace, dashboard
apigateway Gateway API with Traefik
networkForwarding Forward host ports 80/443 into the cluster (socat services)

[!NOTE]

Traefik is the only supported ingress and Gateway API controller. NGINX, Kong and Cilium ingress/gateway are archived; kind setup warns if master.yaml selects one.

Create the cluster

# common tools + Kind + CNI + load balancer + Traefik
./scripts/setup.sh kind setup
# preview the Ansible command first
./scripts/setup.sh kind setup --dry-run

Verify

On the target host (./scripts/setup.sh vagrant ssh k8s-master-machine for a VM):

kubectl cluster-info --context kind-kubewekend
kubectl get nodes -o wide
kubectl get pods -A

Add utilities

# tags, options and current values
./scripts/setup.sh kind utils --list
./scripts/setup.sh kind utils certmanager ingress_test dashboard

ingress_test and apigateway_test deploy a sample app behind Traefik so you can check routing. See Utilities.

Tear down

./scripts/setup.sh kind destroy
# when you used a VM
./scripts/setup.sh vagrant destroy k8s-master-machine

[!WARNING]

On your own machine, kind destroy also removes the socat-netforward-port-80/443 services. If you skip it, disable them with sudo systemctl disable --now socat-netforward-port-80 socat-netforward-port-443.

Learn more


Back to top

Kubewekend is a learning and lab project: it is not hardened for production. Charts are served from this site: helm repo add kubewekend https://kubewekend.xeusnguyen.xyz