Azure kubernetes kube-proxy 解释

Azure kubernetes kube-proxy explanation

我对 Kubernetes 有点陌生,我想了解 Azure AKS/regular 集群中 Kube-proxy 的用途是什么。 据我了解,Kube-proxy 由 API 集群从各种部署配置更新,然后更新 Linux 内核中负责流量路由的 IP-table 堆栈在 pods 和服务之间。

我是不是漏掉了什么重要的东西?

谢谢!!

基本上每个节点上的 kube-proxy 组件 运行 提供网络功能。它是 运行 作为 Kubernetes DaemonSet and its configuration is stored on a Kubernetes ConfigMap。您可以使用以下命令在 kube-system 命名空间上编辑 kube-proxy DaemonSetConfigMap

$ kubectl -n kube-system edit daemonset kube-proxy

$ kubectl -n kube-system edit configmap kube-proxy

kube-proxy currently supports three different operation modes:

  • User space: This mode gets its name because the service routing takes place in kube-proxy in the user process space instead of in the kernel network stack. It is not commonly used as it is slow and outdated.
  • IPVS (IP Virtual Server): Built on the Netfilter framework, IPVS implements Layer-4 load balancing in the Linux kernel, supporting multiple load-balancing algorithms, including least connections and shortest expected delay. This kube-proxy mode became generally available in Kubernetes 1.11, but it requires the Linux kernel to have the IPVS modules loaded. It is also not as widely supported by various Kubernetes networking projects as the iptables mode.
  • iptables: This mode uses Linux kernel-level Netfilter rules to configure all routing for Kubernetes Services. This mode is the default for kube-proxy on most platforms. When load balancing for multiple backend pods, it uses unweighted round-robin scheduling.
  • IPVS (IP Virtual Server): Built on the Netfilter framework, IPVS implements Layer-4 load balancing in the Linux kernel, supporting multiple load-balancing algorithms, including least connections and shortest expected delay. This kube-proxy mode became generally available in Kubernetes 1.11, but it requires the Linux kernel to have the IPVS modules loaded. It is also not as widely supported by various Kubernetes networking projects as the iptables mode.

看看:kube-proxy, kube-proxy-article, .

另请阅读:proxies-in-kubernetes