Kubernetes网络插件 [英] Kubernetes network plugin

查看:233
本文介绍了Kubernetes网络插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用calico网络插件安装了一个由3个节点组成的Kubernetes集群. 由于某种原因,我决定完全删除kubernetes,并使用另一个网络插件Flannel重新发布它.

I have installed a Kubernetes cluster of 3 nodes with the calico network plugin. For some reason I decided to remove totally kubernetes and reisntall it with a different network plugin: Flannel.

在我尝试部署第一个容器之前,一切似乎都还不错.

All seemed fine until I tried to deploy my first container.

kubectl describe pod/cassandra返回以下错误:

Unknown desc = [failed to set up sandbox container "957f68c3cbe9b230b0e2bd6729a12c340f903de568622e28e335f7b48563a445" network for pod "cassandra-d7db46b86-dz7ck": networkPlugin cni failed to set up pod "cassandra-d7db46b86-dz7ck_default" network: error getting ClusterInformation: Get https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes"), failed to clean up sandbox container "957f68c3cbe9b230b0e2bd6729a12c340f903de568622e28e335f7b48563a445" network for pod "cassandra-d7db46b86-dz7ck": networkPlugin cni failed to teardown pod "cassandra-d7db46b86-dz7ck_default" network: error getting ClusterInformation: Get https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")]
  Normal   SandboxChanged          3s (x3 over 18s)  kubelet, <node name>  Pod sandbox changed, it will be killed and re-created.

阅读错误后,尽管我删除了calico插件并安装了Flannel插件,但Kubernetes仍在使用calico插件.

By reading at the errors it seems that the calico plugin is still used by Kubernetes, although I removed it and installed the Flannel plugin.

我如何清理这个烂摊子?

How can I clean this mess ?

推荐答案

  1. 清除ip路由:ip路由清除原始鸟
  2. 删除所有节点中的所有calico链接

ip link list | grep cali | awk '{print $2}' | cut -c 1-15 | xargs -I {} ip link delete {}

  1. 删除ipip模块modprobe -r ipip
  2. 删除印花布配置

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

  1. 重新启动kubelet服务

此后,您将安装法兰绒.

After this you install flannel.

这篇关于Kubernetes网络插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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