Kubernetes:用印花棉布替换法兰绒 [英] Kubernetes: Replace Flannel with Calico
问题描述
我是Kubernetes的新手,我想尝试使用不同的CNI.
I am new to Kubernetes and I would like to try different CNI.
在当前的集群中,我正在使用Flannel
In my current Cluster, I am using Flannel
现在,我想使用Calico,但找不到合适的指南来清理Flannel和安装Calico.
Now, I would like to use Calico but I cannot find a proper guide to clean up Flannel and install Calico.
能否请您指出正确的程序?
Could you please point out the correct procedure?
谢谢
推荐答案
Calico提供了一种迁移工具,可以对集群中的节点进行滚动更新.最后,您将拥有一个在Pod之间使用VXLAN网络的功能齐全的Calico群集.
Calico provides a migration tool that performs a rolling update of the nodes in the cluster. At the end, you will have a fully-functional Calico cluster using VXLAN networking between pods.
从文档我们有:
过程
1-首先,安装Calico.
1 - First, install Calico.
kubectl apply -f https://docs.projectcalico.org/v3.10/manifests/flannel-migration/calico.yaml
然后,安装迁移控制器以启动迁移.
Then, install the migration controller to initiate the migration.
kubectl apply -f https://docs.projectcalico.org/v3.10/manifests/flannel-migration/migration-job.yaml
应用后,您将看到节点开始一次更新一个.
Once applied, you will see nodes begin to update one at a time.
2-要监视迁移,请运行以下命令.
2 - To monitor the migration, run the following command.
kubectl get jobs -n kube-system flannel-migration
在迁移过程中,升级托管它的节点时,迁移控制器可能会重新安排几次.当以上命令的输出显示1/1完成时,说明安装已完成.例如:
The migration controller may be rescheduled several times during the migration when the node hosting it is upgraded. The installation is complete when the output of the above command shows 1/1 completions. For example:
NAME COMPLETIONS DURATION AGE
flannel-migration 1/1 2m59s 5m9s
3-完成后,使用以下命令删除迁移控制器.
3 - After completion, delete the migration controller with the following command.
kubectl delete -f https://docs.projectcalico.org/v3.10/manifests/flannel-migration/migration-job.yaml
To know more about it: Migrating a cluster from flannel to Calico
本文介绍了如何通过绒布网络迁移现有Kubernetes集群以使用Calico网络.
This article describes how migrate an existing Kubernetes cluster with flannel networking to use Calico networking.
这篇关于Kubernetes:用印花棉布替换法兰绒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!