<p>I am new to Kubernetes and I would like to try different CNI.</p>

<p>In my current Cluster, I am using Flannel</p>

<p>Now, I would like to use Calico but I cannot find a proper guide to clean up Flannel and install Calico.</p>

<p>Could you please point out the correct procedure?</p>

<p>Thanks</p>

gaetano
<p>Calico provides a migration tool that performs a rolling update of the nodes in the cluster. At the end, you will have a fully-functional Calico cluster using VXLAN networking between pods.</p>

<p>From the <a href="https://docs.projectcalico.org/v3.10/getting-started/kubernetes/installation/migration-from-flannel" rel="nofollow noreferrer">documentation</a> we have: </p>

<p><strong>Procedure</strong></p>

<p>1 - First, install Calico.</p>

<pre><code>kubectl apply -f https://docs.projectcalico.org/v3.10/manifests/flannel-migration/calico.yaml
</code></pre>

<p>Then, install the migration controller to initiate the migration.</p>

<pre><code>kubectl apply -f https://docs.projectcalico.org/v3.10/manifests/flannel-migration/migration-job.yaml
</code></pre>

<p>Once applied, you will see nodes begin to update one at a time.</p>

<p>2 - To monitor the migration, run the following command.</p>

<pre><code>kubectl get jobs -n kube-system flannel-migration
</code></pre>

<p>The migration controller may be rescheduled several times during the migration when the node hosting it is upgraded. The installation is complete when the output of the above command shows 1/1 completions. For example:</p>

<pre><code>NAME                COMPLETIONS   DURATION   AGE
flannel-migration   1/1           2m59s      5m9s
</code></pre>

<p>3 - After completion, delete the migration controller with the following command.</p>

<pre><code>kubectl delete -f https://docs.projectcalico.org/v3.10/manifests/flannel-migration/migration-job.yaml
</code></pre>

<p>To know more about it: <strong><a href="https://docs.projectcalico.org/v3.10/getting-started/kubernetes/installation/migration-from-flannel" rel="nofollow noreferrer">Migrating a cluster from flannel to Calico</a></strong></p>

<p>This article describes how migrate an existing Kubernetes cluster with flannel networking to use Calico networking.</p>
