<p>To install kubernetes using flannel, one initially needs to run:</p>

<pre><code>kubeadm init --pod-network-cidr 10.244.0.0/16
</code></pre>

<p>Questions are:</p>

<ul>
<li>What is the purpose of "pod-network-cidr"?</li>
<li>What's the meaning of such IP "10.244.0.0/16"?</li>
<li>How flannel uses this afterwards?</li>
</ul>

<p>pod-network-cidr is the virtual network that pods will use. That is, any created pod will get an IP inside that range. </p>

<p>The reason of setting this parameter in flannel is because of the following: <a href="https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml" rel="noreferrer">https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml</a></p>

<p>Let us take a look at the configuration:</p>

<pre><code>  net-conf.json: |
    {
      "Network": "10.244.0.0/16",
      "Backend": {
        "Type": "vxlan"
      }
    }
</code></pre>

<p>kube-flannel yml file has 10.244.0.0/16 hardcoded as the network value. If you wanted to use another network (for example, the default that kubeadm uses), you would have to modify the yml to match that networking. In this sense, it is easier to simply start kubeadm with 10.244.0.0/16 so the yml works out of the box.</p>

<p>With that configuration, flannel will configure the overlay in the different nodes accordingly. More details here: <a href="https://blog.laputa.io/kubernetes-flannel-networking-6a1cb1f8ec7c" rel="noreferrer">https://blog.laputa.io/kubernetes-flannel-networking-6a1cb1f8ec7c</a></p>
