From 251ba448627301f0e611777bce278b187e36b9d3 Mon Sep 17 00:00:00 2001 From: azych <5843875+azych@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:52:08 +0200 Subject: [PATCH] fix: set correct pod CIDR in 13-configure-pod-networking.md --- docs/13-configure-pod-networking.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/13-configure-pod-networking.md b/docs/13-configure-pod-networking.md index 860cdc0b8..4e4ec669d 100644 --- a/docs/13-configure-pod-networking.md +++ b/docs/13-configure-pod-networking.md @@ -9,14 +9,38 @@ We chose to use CNI - [weave](https://www.weave.works/docs/net/latest/kubernetes Some of you may have noticed the announcement that WeaveWorks is no longer trading. At this time, this does not mean that Weave is not a valid CNI. WeaveWorks software has always been and remains to be open source, and as such is still useable. It just means that the company is no longer providing updates. While it continues to be compatible with Kubernetes, we will continue to use it as the other options (e.g. Calico, Cilium) require far more configuration steps. -Deploy weave network. Run only once on the `controlplane01` node. You may see a warning, but this is OK. +Weave sets its [default network CIDR](https://github.com/weaveworks/weave/blob/master/site/kubernetes/kube-addon.md#-changing-configuration-options) to '10.32.0.0/12', which means we need to modify it before the installation +to match the [CIDR we picked](01-prerequisites.md#pod-network) at the beginning for our POD network - ie. '10.244.0.0/16'. [//]: # (host:controlplane01) On `controlplane01` +Download the weave manifest: + +```bash +curl -LO "https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s-1.11.yaml" +``` + +Manually edit the manifest and set the correct POD network CIDR via IPALLOC_RANGE environment variable: + +``` +vim weave-daemonset-k8s-1.11.yaml + +... +containers: +- name: weave + env: + ... + - name: IPALLOC_RANGE + value: 10.244.0.0/16 +... +``` + +Deploy weave network. Run only once on the `controlplane01` node. You may see a warning, but this is OK: + ```bash -kubectl apply -f "https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s-1.11.yaml" +kubectl apply -f weave-daemonset-k8s-1.11.yaml ```