简体   繁体   English

当 kube 代理在 ipvs 模式下运行时,calico 是否也以 ipvs 模式运行

[英]does calico also run in ipvs mode when kube proxy is runing in ipvs mode

I understood kube-proxy can run in iptables or ipvs mode.我知道 kube-proxy 可以在 iptables 或 ipvs 模式下运行。 Also, calico sets up iptables rules.此外,calico 设置了 iptables 规则。

But does calico iptables rules are only installed when kube proxy is running in iptables mode OR these iptables rules are installed irrespective to kube-proxy mode?但是,是否仅在 kube 代理以 iptables 模式运行时才安装 calico iptables 规则,或者无论 kube-proxy 模式如何安装这些 iptables 规则?

According to the documentation :根据文档

Calico ipvs support is activated automatically if Calico detects that kube-proxy is running in that mode.如果 Calico 检测到 kube-proxy 在该模式下运行,则会自动激活 Calico ipvs 支持。

The short answer is yes - Calico supports IPVS kube-proxy mode:简短的回答是肯定的- Calico 支持 IPVS kube-proxy 模式:

Calico ipvs support is activated automatically if Calico detects that kube-proxy is running in that mode.如果 Calico 检测到 kube-proxy 在该模式下运行,则会自动激活 Calico ipvs 支持。

Additionally:此外:

Calico will detect if you change kube-proxy 's proxy mode after Calico has been deployed. Calico 将检测您是否在部署 Calico 后更改了kube-proxy的代理模式。 Any Kubernetes ipvs -specific configuration needs to be configured before changing the kube-proxy proxy mode to ipvs任何Kubernetes ipvs特异性配置需要被构造成改变所述前kube-proxy代理模式ipvs

However, as you have noticed yourself kube-proxy can run in iptables or ipvs mode.但是,正如您所注意到的,kube-proxy 可以在iptablesipvs模式下运行。 See the comparison between iptables and ipvs mode :iptablesipvs mode 对比

IPVS is a Linux kernel feature that is specifically designed for load balancing. IPVS 是一个 Linux 内核功能,专为负载平衡而设计。 In IPVS mode, kube-proxy programs the IPVS load balancer instead of using iptables.在 IPVS 模式下,kube-proxy 对 IPVS 负载均衡器进行编程,而不是使用 iptables。 In addition, as a dedicated load balancer, IPVS boasts multiple different scheduling algorithms such as round-robin, shortest-expected-delay, least connections, and various hashing approaches.此外,作为专用的负载均衡器,IPVS 拥有多种不同的调度算法,例如轮询、最短预期延迟、最少连接和各种散列方法。 In contrast, kube-proxy in iptables uses a randomized equal cost selection algorithm.相比之下,iptables 中的 kube-proxy 使用随机等成本选择算法。

The ipvs mode will provide performance compared to the iptables mode.与 iptables 模式相比,ipvs 模式将提供性能。 However, there are some limitations:但是,有一些限制:

  • Calico requires extra iptables packet marker bits to track packets as they pass through IPVS. Calico 需要额外的 iptables 数据包标记位来跟踪通过 IPVS 的数据包。
  • Calico must be configured with a port range assigned to Kubernetes NodePorts. Calico 必须配置有分配给 Kubernetes NodePorts 的端口范围。 If services are using NodePorts outside of the expected Calico range, Calico will treat traffic to those ports as host traffic, not traffic to them.如果服务使用超出预期 Calico 范围的 NodePort,Calico 会将流向这些端口的流量视为主机流量,而不是它们的流量。

Here you can find a guide, how to use IPVS kube-proxy.在这里您可以找到如何使用 IPVS kube-proxy 的指南。 If you choose to use this mode, Calico will automatically switch to this mode.如果选择使用这种模式,Calico 会自动切换到这种模式。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在准备就绪的Kubernetes本地群集上的Kube代理中启用IPVS模式 - Enable IPVS Mode in Kube Proxy on a ready Kubernetes Local Cluster 具有 IPVS 模式的 Kube-proxy 不保持连接 - Kube-proxy with IPVS mode doesn't keep a connection kubernetes kube 代理模式(IPVS、iptables 或用户空间哪一种) - kubernetes kube proxy mode(which one IPVS,iptables or userspace) Nodeport SFTP / SSH 使用 kube-proxy ipvs 时连接超时 - Nodeport SFTP / SSH connection timeout when using kube-proxy ipvs 使用 k8s 设置 ipvs 模式时“无法设置 sysctl net/ipv4/vs/conn_reuse_mode”是什么意思? - What does it means “can't set sysctl net/ipv4/vs/conn_reuse_mode” when set ipvs mode whith k8s? 如何在 IPVS 模式下为 k8S 配置 Consul - How can I configure Consul for k8S in IPVS mode Kube 代理 - IPVS 代理将不会被使用,因为以下必需的内核模块未加载:[ip_vs_wrr ip_vs_sh] - Kube Proxy - IPVS proxier will not be used because the following required kernel modules are not loaded: [ip_vs_wrr ip_vs_sh] kube-router IPVS-最少连接算法,是否在同一节点或不同节点的 Pod 之间进行负载平衡? - Does kube-router IPVS-least connection algorithm, does load balancing across pods in same node or different nodes? 用户空间模式在kube-proxy的代理模式中意味着什么? - What does userspace mode means in kube-proxy's proxy mode? 为什么 ipvs 调度程序不断回到 rr? - Why does the ipvs scheduler keep coming back to rr?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM