<p>I used <code>kubeadm</code> to initialize my K8 master. However, I missed the <code>--pod-network-cidr=10.244.0.0/16</code> flag to be used with flannel. Is there a way (or a config file) I can modify to reflect this subnet without carrying out the re-init process again?</p>

saruftw
<p>Override PodCIDR parameter on the all k8s Node resource with a IP source range <code>10.244.0.0/16</code></p>

<pre><code>$ kubectl edit nodes nodename
</code></pre>

<p>Replace "Network" field under net-conf.json header in the relevant Flannel ConfigMap with a new network IP range:</p>

<pre><code>$ kubectl edit cm kube-flannel-cfg -n kube-system
net-conf.json: | { "Network": "10.244.0.0/16", "Backend": { "Type": "vxlan" } }
</code></pre>

<p>Wipe current CNI network interfaces remaining the old network pool:</p>

<pre><code>$ sudo ip link del cni0; sudo ip link del flannel.1
</code></pre>

<p>Re-spawn Flannel and CoreDNS pods respectively:</p>

<pre><code>$ kubectl delete pod --selector=app=flannel -n kube-system
$ kubectl delete pod --selector=k8s-app=kube-dns -n kube-system
</code></pre>

<p>Wait until CoreDNS pods obtain IP address from a new network pool. Keep in mind that your custom Pods will still retain the old IP addresses inside containers unless you re-create them manually as well</p>
