I initialized Kubernetes with kubeadm init
, and after I used kubeadm reset
to reset it I found --pod-network-cidr
was wrong. After correct
I figured it out, if you change --pod-network-cidr when you reinitialize kubernetes via kubeadm init, you should delete some auto-created things, just follow the steps below before you execute kubeadm init again:
execute kubeadm reset on master and nodes.
execute etcdctl rm --recursive registry reset data in etcd.
rm -rf /var/lib/cni on master and nodes
rm -rf /run/flannel on master and nodes
rm -rf /etc/cni on master and nodes
ifconfig cni0 down on master and nodes
brctl delbr cni0 on master and nodes
Now, my Kubernetes works fine :)