Skip to content

ipv6 and multiple cni support

Compare
Choose a tag to compare
@aojea aojea released this 01 Apr 14:50

It adds a new option ipFamily to the v1alpha3 API that allows to choose the IP family of the cluster.

To avoid issues with the different networking options the podSubnet and the serviceSubnet options are predefined with the following values:

	DefaultPodSubnet          = "100.64.0.0/12"
	DefaultServicesSubnet     = "10.96.0.0/12"
	DefaultPodSubnetIPv6      = "fd00:100:64::/64"
	DefaultServicesSubnetIPv6 = "fd00:10:96::/112"

Because the CNI plugins require different configurations depending on the IP family we want to use in our cluster, this PR adds an option to select the CNI plugin and flavor when building the node image.

Currently, there are only 3 CNI plugins implemented in kind: weave, calico and calico-ipv6

weave continuous being the default CNI plugin, if we want to choose a new one we have to create a new node-image:

kind build node-image --type apt --cni calico-ipv6 --image kindest/node:calico-ipv6

Using the calico-ipv6 CNI plugin we can create a Kubernetes IPv6 cluster with the following config:

kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
networking:
  ipFamily: ipv6
nodes:
# the control plane node
- role: control-plane
- role: worker
- role: worker

and creating a cluster with the new node image and the previous configuration

kind create cluster --image kindest/node:calico-ipv6 --config test/config-ipv6-ci.yaml --loglevel debug --wait 1m