Forum Navigation
You need to log in to create posts and topics.

uninstall / delete calico network provider

Problem 

User wants to remove calico network from a working kubernetes

Solution

Remove all settings from kubernetes with the following command

kubectl delete -f https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml
kubectl delete -f https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml

kubectl delete -f https://raw.githubusercontent.com/projectcalico/calico/master/calico/hack/remove-calico-policy/iptables-remover-ds.yaml
kubectl delete configmap remove-calico-policy-config -n=kube-system

 

when you run the above commands calico will not be removed completely. Because calico has an init container but does not have a cleanup container.

Remove the following files and directories from the command line ( CENTOS )

rm -rf /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/44/fs/opt/cni/bin/calico
rm -rf /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/44/fs/opt/cni/bin/calico-ipam
rm -rf /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/47/fs/etc/calico
rm -rf /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/47/fs/etc/service/available/calico-bgp-daemon
rm -rf /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/47/fs/usr/bin/calico-node
rm -rf /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/47/fs/usr/lib/calico
rm -rf /var/lib/calico
rm -rf /run/calico
rm -rf /opt/cni/bin/calico
rm -rf /opt/cni/bin/calico-ipam

restart pods

rm /etc/cni/net.d/10-calico.conflist && rm /etc/cni/net.d/calico-kubeconfig