AI0X00English

Kubernetes 擬於 1.40 移除 kube-proxy IPVS 後端,使用者應規劃遷移

Kubernetes SIG Network 計畫在 1.40 版移除 kube-proxy 的 IPVS 後端。該後端自 1.35 起已遭棄用,現有使用者應規劃轉向 nftables 或 iptables。

Kubernetes SIG Network 計畫在 Kubernetes 1.40 移除 kube-proxy 的 ipvs 後端。這項後端自 1.35 起已正式棄用,目前仍可使用但會顯示棄用警告;使用 ipvs 的團隊應規劃遷移至 nftables 或 iptables 後端。

重點摘要

ipvs 的移除目前是 1.40 版計畫,而非已完成的變更。nftables 後端於 Kubernetes 1.29 引入,並在 1.33 正式進入 GA。

效能改善未能解決功能相容性

根據 Kubernetes 官方說明,ipvs 最初是為了改善 iptables 後端的效能而開發。當時 iptables 後端為每個服務 IP 建立獨立規則,新連線需要依序比對規則;服務或端點變更時,kube-proxy 也會重寫整份規則集。在非常大型的叢集中,光是處理規則更新就可能持續占滿一個 CPU。

ipvs 利用核心 IPVS 子系統的雜湊表,改善了新連線的查找方式,也不必在每次更新時重寫整份規則集。不過,官方指出,核心 IPVS API 與 Kubernetes Services API 並不匹配,ipvs 後端始終無法正確實作所有 Service 功能的邊緣情況。

此外,IPVS API 缺少批次更新操作:少量變更時,ipvs 可能比 iptables 快,但大量變更同時發生時則可能更慢。為了實作基本負載平衡以外的 Service 功能,ipvs 也必須回退使用 iptables,因此仍會遇到部分相同的擴展性問題。

遷移規劃重點

  • 目前狀態:ipvs 後端自 Kubernetes 1.35 起棄用,目前仍可使用並會顯示警告。
  • 移除時程:SIG Network 計畫在 Kubernetes 1.40 移除該後端。
  • 替代選項:官方建議所有 ipvs 使用者規劃遷移至 nftables 或 iptables。

Kubernetes 引入 nftables 後端的計畫之一,是讓它最終取代 iptables 與 ipvs。對現有 ipvs 使用者而言,現在應將後端遷移納入升級規劃,而非等到預定移除版本才處理。

來源

原文查證

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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

計畫在 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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

所有 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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

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

AlanAlan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 → · 查核步驟 · claude-sonnet-4-6

製作紀錄
  1. Ada總編分流決策Ada總編分流決策評估一手技術公告價值、過濾重複事件並指派最適合的撰稿管線。點擊查看員工詳細介紹 →比對近期事件與稿件以防重複

    耗時 0.6 秒

  2. Ada總編分流決策Ada總編分流決策評估一手技術公告價值、過濾重複事件並指派最適合的撰稿管線。點擊查看員工詳細介紹 →評估新聞價值並指派編採模型與流程

    耗時 0.2 秒

  3. Barbara雙語標籤整理Barbara雙語標籤整理標準化跨語言技術主題概念與產品脈絡,維持全站標籤樹精準乾淨。點擊查看員工詳細介紹 →評估新聞重要度與產品分類

    耗時 5.3 秒

  4. Alan查核與審稿Alan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 →查核事實並標記矛盾

    耗時 14.0 秒

  5. Linus主力深度撰稿Linus主力深度撰稿專注於大型版本釋出、系統架構變動與資安漏洞的深度技術撰寫。點擊查看員工詳細介紹 →撰寫候選稿與圖文規劃

    耗時 24.8 秒

  6. Alan查核與審稿Alan查核與審稿獨立比對原文引文、版本號與技術聲明,零幻覺把關每篇報導品質。點擊查看員工詳細介紹 →獨立審閱稿件

    耗時 6.3 秒

  7. AI 自動審核核准本版稿件

  8. AI0X00交付本版發布