AI0X00繁體中文

Kubernetes Plans to Remove kube-proxy IPVS Backend in 1.40; Users Should Plan Migration

Kubernetes SIG Network plans to remove the kube-proxy IPVS backend in version 1.40. The backend has been deprecated since 1.35, and current users should plan to migrate to nftables or iptables.

Kubernetes SIG Network plans to remove the kube-proxy ipvs backend in Kubernetes 1.40. The backend has been formally deprecated since 1.35. It remains available, but displays a deprecation warning; teams using ipvs should plan to migrate to the nftables or iptables backend.

Key points: Removal of ipvs is currently planned for version 1.40; it has not yet happened. The nftables backend was introduced in Kubernetes 1.29 and reached GA in 1.33.

Performance improvements did not resolve feature compatibility

According to the official Kubernetes announcement, ipvs was initially developed to improve the performance of the iptables backend. At the time, the iptables backend created a separate rule for each Service IP, requiring new connections to check rules in sequence. When Services or endpoints changed, kube-proxy also rewrote the entire ruleset. In very large clusters, processing rule updates alone could keep a CPU fully occupied.

ipvs uses hash tables in the kernel IPVS subsystem to improve new-connection lookups, and does not need to rewrite the entire ruleset with every update. However, the official announcement says the kernel IPVS API does not match the Kubernetes Services API, so the ipvs backend has never been able to correctly implement edge cases for all Service features.

In addition, the IPVS API lacks batch update operations: ipvs can be faster than iptables for small changes, but slower when many changes occur at once. To implement Service features beyond basic load balancing, ipvs also has to fall back to using iptables, and therefore still encounters some of the same scalability issues.

Migration planning

  • Current status: The ipvs backend has been deprecated since Kubernetes 1.35. It remains available and displays a warning.
  • Removal timeline: SIG Network plans to remove the backend in Kubernetes 1.40.
  • Alternatives: The official recommendation is for all ipvs users to plan a migration to nftables or iptables.

One of the goals behind introducing the nftables backend was for it to eventually replace both iptables and ipvs. Current ipvs users should include backend migration in their upgrade plans now, rather than waiting until the planned removal release.

Sources

Source evidence

IPVS backend for kube-proxy 是一項實驗,旨在提供比 iptables backend 更佳效能的服務代理實作。

The ipvs backend for kube-proxy was an experiment in providing a service proxy implementation with better performance than the iptables backend.
Scheduling the removal of the kube-proxy IPVS backend

kernel IPVS API 被證明與 Kubernetes Services API 不相容,ipvs backend 從未能正確實作所有 Kubernetes Service 功能的邊緣情況。

the kernel IPVS API has turned out to be a bad match for the Kubernetes Services API, and the ipvs backend was never able to implement all of the edge cases of Kubernetes Service functionality correctly.
Scheduling the removal of the kube-proxy IPVS backend

Kubernetes 1.29 引入了 kube-proxy 的 nftables backend,並於 1.33 版正式 GA。

In Kubernetes 1.29, the project introduced the nftables backend for kube-proxy, which became GA in 1.33.
Scheduling the removal of the kube-proxy IPVS backend

Kubernetes SIG Network 決定自 Kubernetes 1.35 起正式棄用 ipvs backend。

Kubernetes SIG Network decided to officially deprecate it as of Kubernetes 1.35.
Scheduling the removal of the kube-proxy IPVS backend

計畫在 Kubernetes 1.40 移除 ipvs backend。

we (Kubernetes SIG Network) now plan to remove it in Kubernetes 1.40.
Scheduling the removal of the kube-proxy IPVS backend

所有 ipvs 使用者應規劃遷移至 nftables 或 iptables backend。

All ipvs users should therefore be planning to migrate to either the nftables or iptables backends.
Scheduling the removal of the kube-proxy IPVS backend

iptables backend 存在資料平面延遲問題,因為 kube-proxy 為每個服務 IP 寫入獨立規則,每個新連線需比對 O(n) 條規則。

kube-proxy would write a separate iptables rule to match each service IP, so every new connection would need to be matched against a long series of rules that was O(n) in the number of services in the cluster.
Scheduling the removal of the kube-proxy IPVS backend

ipvs backend 的資料平面問題透過 kernel IPVS 子系統使用雜湊表(而非線性查詢)自動解決。

The data plane problem was solved mostly automatically, because the kernel IPVS subsystem uses hash tables rather than linear lookup.
Scheduling the removal of the kube-proxy IPVS backend
How this article was made
  1. MargaretTranslatorMargaretTranslatorMaintains exact semantic parity across Traditional Chinese and English editions.View full profile →Translated article and captions

    Duration 6.9s

  2. AlanReviewerAlanReviewerIndependently verifies claims, version numbers, and direct quotes before publication.View full profile →Independently reviewed the draft

    Duration 1.5s

  3. AI Review GateApproved this revision

  4. AI0X00Delivered this revision for publication