根据 Cloud NAT 上的 GCP 文档,
Regular (non-private) GKE clusters assign each node an external IP address, so such clusters cannot use Cloud NAT to send packets from the node's primary interface. Pods can still use Cloud NAT if they send packets with source IP addresses set to the pod IP
问题:如何配置 pod 在向某些外部服务发送数据包时将源 IP 设置为 pod IP?
最佳答案
Cloud NAT用于允许只有内部 IP 地址的 GCE 实例或 GKE 集群访问 Internet 上的公共(public)资源。如果您想使用 Cloud NAT,您需要关注 guidelines from the public docs或者您可以 build your own NAT gateway using a GCE Instance这不需要您使用私有(private)集群。
关于google-cloud-platform - 如何使用 sourceIP 在公共(public) GKE 集群 pod 中使用云 NAT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54534513/