google-cloud-platform - 如何使用 sourceIP 在公共(public) GKE 集群 pod 中使用云 NAT

标签 google-cloud-platform nat google-kubernetes-engine

根据 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/

相关文章:

kubernetes - 如何在 gcloud 和 minikube 之间切换 kubectl 集群

git - 如何在GCP的Gerrit容器中克隆项目?

apache-spark - 使用服务帐户和 IAM 角色管理 dataproc 集群访问

ssl - 通过路由器设置的基本 SSL

port - Virtualbox 以 localhost 身份从 guest 访问主机本地主机上的端口( guest -> 主机端口转发)

kubernetes - 如何在Kubernetes中更新服务?

apache-spark - 我们能否仅在 GKE 或私有(private)本地 k8s 上运行 Dataproc?

google-app-engine - 通过 API 调用管理应用引擎版本

networking - 以编程方式启用 Internet 连接共享

kubernetes - Kubernetes 中的 sidecar 与 init 容器