diff --git a/bastion/src/modules/modules/k3s/src/install.ts b/bastion/src/modules/modules/k3s/src/install.ts index e9202cd..b899668 100644 --- a/bastion/src/modules/modules/k3s/src/install.ts +++ b/bastion/src/modules/modules/k3s/src/install.ts @@ -215,7 +215,9 @@ echo " Using network device: \$DEFAULT_DEV" KUBECONFIG=/etc/rancher/k3s/k3s.yaml cilium install \\ --set kubeProxyReplacement=true \\ - --set ipam.mode=kubernetes \\ + --set ipam.mode=cluster-pool \\ + --set ipam.operator.clusterPoolIPv4PodCIDRList='{10.42.0.0/16}' \\ + --set ipam.operator.clusterPoolIPv4MaskSize=24 \\ --set devices="\$DEFAULT_DEV" \\ --set nodePort.directRoutingDevice="\$DEFAULT_DEV" diff --git a/bastion/src/modules/modules/k3s/src/operations/cilium.ts b/bastion/src/modules/modules/k3s/src/operations/cilium.ts index 7ac05ff..054f8d2 100644 --- a/bastion/src/modules/modules/k3s/src/operations/cilium.ts +++ b/bastion/src/modules/modules/k3s/src/operations/cilium.ts @@ -47,7 +47,9 @@ export const installCilium: Operation = async (ctx): Promise => const installResult = await ctx.ssh.exec( `KUBECONFIG=/etc/rancher/k3s/k3s.yaml cilium install \ --set kubeProxyReplacement=true \ - --set ipam.mode=kubernetes \ + --set ipam.mode=cluster-pool \ + --set ipam.operator.clusterPoolIPv4PodCIDRList='{10.42.0.0/16}' \ + --set ipam.operator.clusterPoolIPv4MaskSize=24 \ --set k8sServiceHost=127.0.0.1 \ --set k8sServicePort=6444 \ --set cni.exclusive=false \ diff --git a/bastion/tests/integration/k3s-single-node.test.ts b/bastion/tests/integration/k3s-single-node.test.ts index d52c328..f139965 100644 --- a/bastion/tests/integration/k3s-single-node.test.ts +++ b/bastion/tests/integration/k3s-single-node.test.ts @@ -161,7 +161,7 @@ EOF' CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt) curl -L --fail --silent "https://github.com/cilium/cilium-cli/releases/download/\${CILIUM_CLI_VERSION}/cilium-linux-amd64.tar.gz" | sudo tar xz -C /usr/local/bin DEFAULT_DEV=$(ip -4 route show default | awk '{print $5}' | head -1) - sudo KUBECONFIG=/etc/rancher/k3s/k3s.yaml cilium install --set kubeProxyReplacement=true --set ipam.mode=kubernetes --set devices=$DEFAULT_DEV --set nodePort.directRoutingDevice=$DEFAULT_DEV + sudo KUBECONFIG=/etc/rancher/k3s/k3s.yaml cilium install --set kubeProxyReplacement=true --set ipam.mode=cluster-pool --set ipam.operator.clusterPoolIPv4PodCIDRList='{10.42.0.0/16}' --set ipam.operator.clusterPoolIPv4MaskSize=24 --set devices=$DEFAULT_DEV --set nodePort.directRoutingDevice=$DEFAULT_DEV `.trim(), "cilium install", { keyPath: sshKeyPath, timeout: 120_000 }); log("Waiting for Cilium to be ready...");