Skip to content

Multi-cluster KinD deployment considerations

When deploying multiple [[KinD]] (Kubernetes in Docker) clusters on a single host, specific network configurations must be managed to prevent IP conflicts between the clusters.^[kind-lb__README.md]

IP Address Management

The primary consideration for multi-cluster setups is the management of public IP addresses allocated by the load balancer (specifically MetalLB in this context).^[kind-lb__README.md] The IP ranges used for LoadBalancer resources are dictated by the Docker network subnet created by KinD.^[kind-lb__README.md]

The IP address structure follows this pattern: * First two octets: Determined automatically by the Docker network.^[kind-lb__README.md] * Third octet: Configurable via the ip-octet parameter (default is 255).^[kind-lb__README.md] * Fourth octet: Hardcoded in the range 200–240.^[kind-lb__README.md]

This configuration allows a maximum of 40 public IPv4 addresses per cluster.^[kind-lb__README.md]

Preventing Overlapping Subnets

While the ip-octet parameter is optional for single-cluster deployments, it is critical to provide unique values for each cluster when running multiple clusters on the same machine.^[kind-lb__README.md] Failing to assign distinct ip-octet values will result in overlapping address ranges, causing network routing issues.

For example, when provisioning two clusters, distinct identifiers should be used to ensure separate IP spaces:^[kind-lb__README.md]

./setupkind.sh --cluster-name cluster1 --ip-octet 255
./setupkind.sh --cluster-name cluster2 --ip-octet 245

Sources

  • [kind-lb__README.md] (kind-lb__README.md)