Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes cannot cleanup Flannel

First I start Kubernetes using Flannel with 10.244.0.0.

Then I reset all and restart with 10.84.0.0.

However, the interface flannel.1 still is 10.244.1.0

That's how I clean up:

kubeadm reset
systemctl stop kubelet
systemctl stop docker
rm -rf /var/lib/cni/
rm -rf /var/lib/kubelet/*
rm -rf /run/flannel
rm -rf /etc/cni/
ifconfig cni0 down
brctl delbr cni0
ifconfig flannel.1 down
systemctl start docker

Am I missing something in the reset?

like image 943
xren Avatar asked Sep 18 '17 10:09

xren


People also ask

How does flannel work in Kubernetes?

Flannel is an open-source virtual network project managed by CoreOS network designed for Kubernetes. Each host in a flannel cluster runs an agent called flanneld . It assigns each host a subnet, which acts as the IP address pool for containers running on the host.


1 Answers

Because your ip link have the old record

look by

ip link you can see the record, and if you want to clean the record of old flannel and cni

please try

ip link delete cni0 ip link delete flannel.1

like image 70
sam Avatar answered Oct 06 '22 08:10

sam