kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 name: ${Vars.Cluster.Name} networking: podSubnet: "${Vars.Cluster.PodSubNet}" serviceSubnet: "${Vars.Cluster.ServieSubNet}" nodes: %{ for nd in Vars.Cluster.Nodes } - role: ${nd.Role} image: kindest/node:v${Vars.Cluster.Version} %{ if nd.Role == "control-plane"} kubeadmConfigPatches: - | kind: InitConfiguration %{ if Vars.Cluster.IngressReady } nodeRegistration: kubeletExtraArgs: node-labels: "ingress-ready=true" %{ endif } extraPortMappings: - containerPort: 31000 hostPort: 31000 listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0" - containerPort: 80 hostPort: 8080 listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0" %{ if Vars.Cluster.IngressReady } labels: ingress-ready: true %{ endif } %{ endif } %{ if nd.Role == "worker" } kubeadmConfigPatches: - | kind: JoinConfiguration nodeRegistration: kubeletExtraArgs: system-reserved: memory=2Gi %{ endif } %{ endfor ~}