[英]Why my Kubernetes pod network traffic does not go through the iptables NAT table?
我需要在 K8s pod 中根据某些条件将 iptables 规则写入 SNAT 数据包,但网络流量永远不会通过 NAT 表
Why my Kubernetes pod network traffic does not go through the iptables NAT table?为什么我的 Kubernetes pod 网络流量不通过 iptables NAT 表?
Ans :答:
Because Kubernetes Dictates so to all CNI.因为 Kubernetes 对所有 CNI 都有这样的规定。 Following is from Kubernetes Documentation以下来自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.