问题
I am attempting to build a Kubernetes cluster on Google Container Engine where its pods do requests to the internet (incoming or egress traffic). These outgoing connections must be limited to a static IP or limited to a range of them.
回答1:
The external IP address is the IP address of the node machines in the GKE cluster. You can specify static IP address to these node vms from the VPC Network => External IP addresses.
A more complex option would be to create a NAT gateway on a separate VM and then route all the traffic from Kubernetes nodes through it.
回答2:
You can opt to https://github.com/doitintl/kubeIP and avoid configuring with NAT
来源:https://stackoverflow.com/questions/46687208/reserve-a-range-of-static-ips-for-kubernetes-pods