<p>I have a application running with kubernetes orchestrator. I want to implement calico network policy <strong>on the basis of CIDR</strong> so that I can control the pod's traffic (incoming and outgoing). I am looking for prerequisite installation (any plugin) and what changes (calico yaml file or manifest file) are required to achieve this.</p>
<p>Some explanation about steps that need to be implemented will be appreciated.</p>

solveit
<p>By default as explained <a href="https://rancher.com/docs/k3s/latest/en/installation/network-options/" rel="nofollow noreferrer">here</a> K3s is running with flannel CNI, using VXLAN as default backend.</p>
<p>To change the CNI you need to run <code>K3s</code> with <code>--flannel-backend=none</code>. For more information please visit <a href="https://rancher.com/docs/k3s/latest/en/installation/network-options/#custom-cni" rel="nofollow noreferrer">custom-CNI</a> section of the docs.</p>
<p>Please note that besides calico you can run <a href="https://docs.projectcalico.org/getting-started/kubernetes/flannel/flannel" rel="nofollow noreferrer">canal CNI</a> which in fact is flannel with calico network policies available.</p>
