将cni插件从绒布转换为印花布然后再绒布后,Pod无法启动 [英] Pods failed to start after switch cni plugin from flannel to calico and then flannel

查看:165
本文介绍了将cni插件从绒布转换为印花布然后再绒布后,Pod无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cni插件法兰绒从kubeadm安装了kubernetes v1.11.5,一切正常.但是,在尝试切换到印花布后,我发现跨机Pod通讯中断.所以我切换回法兰绒.但是在创建Pod时收到错误消息:

I install kubernetes v1.11.5 from kubeadm with cni plugin flannel and everything is ok. But I after try to switch to calico I found that the cross machine pod communication is broken. So I switch back to flannel. But got error message when creating pod:

似乎我需要重置CNI网络?但是我不知道如何解决这个问题.

It seems that I need to reset cni network? But I don't know how to solve this problem.

我的法兰绒和印花布安装遵循 kubeadm指令零配置更新.

My flannel and calico installation is follow kubeadm instruction with zero config update.

推荐答案

我使用以下步骤从没有kubeadm reset的kubernetes中删除旧的calico配置:

I use following steps to remove old calico configs from kubernetes without kubeadm reset:

  1. 清除ip路由:ip route flush proto bird
  2. 删除所有节点ip link list | grep cali | awk '{print $2}' | cut -c 1-15 | xargs -I {} ip link delete {}
  3. 中的所有calico链接
  4. 删除ipip模块modprobe -r ipip
  5. 删除印花布配置rm /etc/cni/net.d/10-calico.conflist && rm /etc/cni/net.d/calico-kubeconfig
  6. 重新启动kubelet service kubelet restart
  1. clear ip route: ip route flush proto bird
  2. remove all calico links in all nodes ip link list | grep cali | awk '{print $2}' | cut -c 1-15 | xargs -I {} ip link delete {}
  3. remove ipip module modprobe -r ipip
  4. remove calico configs rm /etc/cni/net.d/10-calico.conflist && rm /etc/cni/net.d/calico-kubeconfig
  5. restart kubelet service kubelet restart

完成这些步骤后,所有正在运行的Pod将无法连接,那么我必须删除所有Pod,然后所有Pod才能工作.如果您使用的是replicaset,则会产生垃圾影响.

After those steps all the running pods won't be connect, then I have to delete all the pods, then all the pods works. This has litter influence if you are using replicaset.

这篇关于将cni插件从绒布转换为印花布然后再绒布后,Pod无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆