Identify Outbound IP Addresses on GKE¶
This section will walk you through identifying the outbound IP addresses that applications running on your GKE cluster will end up using for outbound connections.
Overview
What You’ll Need¶
- A configured management environment.
- An existing GKE cluster.
Procedure¶
Find the public IPs of the worker nodes of your GKE cluster, if any:
root@rok-tools:~# kubectl get nodes \ > -o jsonpath='{range .items[*]}'\ > '{.status.addresses[?(@.type=="ExternalIP")].address}{"\n"}{end}' \ > | grep . \ > | sed -e 's|$|/32|' 198.51.100.100/32 203.0.113.100/32 192.0.2.100/32Important
If your cluster scales up or down you have to re-run this since the above list will change.
Summary¶
You have successfully identified the outbound IP addresses in your GKE cluster.
What’s Next¶
The next step is to configure your deployment to allow access from trusted CIDRs.