<p>I'm trying to bootstrap the k8s cluster using weave as cni plugin which was originally configured without --pod-cidr and weave plugin</p>

<pre><code>root@kube1:/etc/systemd/system/kubelet.service.d# kubectl get no
NAME    STATUS   ROLES    AGE   VERSION
kube1   Ready    master   31m   v1.18.2
kube2   Ready    &lt;none&gt;   30m   v1.18.2
kube3   Ready    &lt;none&gt;   31m   v1.18.2
root@kube1:/etc/systemd/system/kubelet.service.d# 
</code></pre>

<p>So i have done the cleanup using the below commands</p>

<pre><code> kubectl drain kube2 --delete-local-data --force --ignore-daemonsets
 kubectl drain kube3 --delete-local-data --force --ignore-daemonsets
 kubectl drain kube1 --delete-local-data --force --ignore-daemonsets

 kubectl delete no kube1 kube2 kube3

 kubeadm reset

 curl -L git.io/weave -o /usr/local/bin/weave
 chmod a+x /usr/local/bin/weave
 kubeadm reset
 weave reset --force

 rm /opt/cni/bin/weave-*

 iptables -P INPUT ACCEPT
 iptables -P FORWARD ACCEPT
 iptables -P OUTPUT ACCEPT
 iptables -t nat -F
 iptables -t mangle -F
 iptables -F
 iptables -X
 systemctl restart docker
</code></pre>

<p>i have ensured the weave bridge interface was deleted on all 3 nodes and re initiated the cluster   </p>

<pre><code>  kubeadm init --apiserver-advertise-address=192.168.56.101 --pod-network-cidr=10.244.0.0/16 --service-cidr=10.100.0.0/16
</code></pre>

<p>I have ensured  the node-cidr was allocated to worker nodes(pod-cidr - 10.244.0.0./16) as below</p>

<pre><code>root@kube1:/etc/systemd/system/kubelet.service.d# kubectl get no kube2 -o yaml|grep -i podCIDR|grep -i 24
  podCIDR: 10.244.2.0/24

root@kube1:/etc/systemd/system/kubelet.service.d# kubectl get no kube3 -o yaml|grep -i podCIDR|grep -i 24
  podCIDR: 10.244.1.0/24
</code></pre>

<p>After i have created the weave pod's ,i was expecting to see the weave bridge interface ip in 10.244.* but it created with default weave configuration (10.32.0.1) it seems</p>

<pre><code>root@kube2:/etc/kubernetes# ifconfig weave
weave: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1376
        inet 10.32.0.1  netmask 255.240.0.0  broadcast 10.47.255.255
        inet6 fe80::187b:63ff:fe5c:a2ae  prefixlen 64  scopeid 0x20&lt;link&gt;
        ether 1a:7b:63:5c:a2:ae  txqueuelen 1000  (Ethernet)
</code></pre>

<p>Is there anything i have missed to clean up? or is it weave plugins default behaviour? </p>

JPNagarajan
<p>By default Weave Net uses its own IP allocator, which can be configured via the environment variable <code>IPALLOC_RANGE</code>. <a href="https://www.weave.works/docs/net/latest/kubernetes/kube-addon/#-changing-configuration-options" rel="nofollow noreferrer">Link to docs</a></p>

<p>If you change the CNI config on each node to use a different IPAM plugin, e.g. <a href="https://github.com/containernetworking/plugins/tree/master/plugins/ipam/host-local" rel="nofollow noreferrer">"host-local"</a>
 you can probably get that to do exactly what you tried to do.</p>
