Create a Kind cluster
Kubernetes in Docker: the fastest cluster to create and throw away. Good for laptops, workshops and CI sandboxes.
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 setupwarns ifmaster.yamlselects 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 destroyalso removes thesocat-netforward-port-80/443services. If you skip it, disable them withsudo systemctl disable --now socat-netforward-port-80 socat-netforward-port-443.