[英]Why my Kubernetes pod network traffic does not go through the iptables NAT table?
我需要在 K8s pod 中根據某些條件將 iptables 規則寫入 SNAT 數據包,但網絡流量永遠不會通過 NAT 表
為什么我的 Kubernetes pod 網絡流量不通過 iptables NAT 表?
答:
因為 Kubernetes 對所有 CNI 都有這樣的規定。 以下來自Kubernetes 文檔
Kubernetes imposes the following fundamental requirements on any networking
implementation (barring any intentional network segmentation policies):
- pods on a node can communicate with all pods on all nodes without NAT
- agents on a node (e.g. system daemons, kubelet) can communicate with all pods on
that node.
Note: For those platforms that support Pods running in the host network
(e.g. Linux):
- pods in the host network of a node can communicate with all pods on all nodes
without NAT
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.