本文介绍了在准备就绪的Kubernetes本地群集上的Kube代理中启用IPVS模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在现有集群中为IPVS启用Kube-proxy模式.当前,它正在IPtables上运行.如何在不影响现有工作量的情况下将其更改为IPVS?

I want to enable the Kube-proxy mode to IPVS in the existing cluster. currently, it is running on IPtables. how can I change it to IPVS without affecting the existing workload?

我已经安装了所有必需的模块来启用它.另外,我的集群是使用kubeadm安装的,但是在安装过程中我没有使用配置文件.在群集上启用IPVS的确切命令应该是什么.

I have already installed all the required modules to enable it. Also, my cluster is installed using kubeadm but, I have not used the configuration file during installation.what should be the command exactly to enable the IPVS on my cluster.

documentation1

documentation2

推荐答案

编辑configmap

Edit the configmap

kubectl edit configmap kube-proxy -n kube-system

将模式从"更改为ipvs

change mode from "" to ipvs

mode: ipvs

杀死所有kube-proxy豆荚

Kill any kube-proxy pods

kubectl get po -n kube-system
kubectl delete po -n kube-system <pod-name>

验证kube-proxy是否已从ipvs proxier启动

Verify kube-proxy is started with ipvs proxier

kubectl logs [kube-proxy pod] | grep "Using ipvs Proxier"

这篇关于在准备就绪的Kubernetes本地群集上的Kube代理中启用IPVS模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-02 02:58